File tree 2 files changed +5
-2
lines changed
2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -185,9 +185,12 @@ bool DataChannel::outgoing(message_ptr message) {
185
185
std::shared_lock lock (mMutex );
186
186
transport = mSctpTransport .lock ();
187
187
188
- if (!transport || mIsClosed )
188
+ if (mIsClosed )
189
189
throw std::runtime_error (" DataChannel is closed" );
190
190
191
+ if (!transport)
192
+ throw std::runtime_error (" DataChannel not open" );
193
+
191
194
if (!mStream .has_value ())
192
195
throw std::logic_error (" DataChannel has no stream assigned" );
193
196
Original file line number Diff line number Diff line change @@ -202,7 +202,7 @@ bool Track::transportSend([[maybe_unused]] message_ptr message) {
202
202
std::shared_lock lock (mMutex );
203
203
transport = mDtlsSrtpTransport .lock ();
204
204
if (!transport)
205
- throw std::runtime_error (" Track is closed " );
205
+ throw std::runtime_error (" Track is not open " );
206
206
207
207
// Set recommended medium-priority DSCP value
208
208
// See https://www.rfc-editor.org/rfc/rfc8837.html#section-5
You can’t perform that action at this time.
0 commit comments