mirror of
https://gitlab.com/comunic/nodejs-webrtcsignalexchangerserver
synced 2024-11-21 21:09:27 +00:00
Can cancel the sending of the current signal message
This commit is contained in:
parent
1f0a615e11
commit
bc723c5f3c
@ -138,6 +138,17 @@ class SignalExchangerClient {
|
||||
this.pending_signal_target = target_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Stop to try to send the current signal message in queue
|
||||
*
|
||||
* This does not cancel the sending of messages already sent through
|
||||
* socket
|
||||
*/
|
||||
cancelCurrentSignal() {
|
||||
this.pending_signal = undefined;
|
||||
this.pending_signal_target = undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Send data to the server
|
||||
*
|
||||
@ -169,8 +180,7 @@ class SignalExchangerClient {
|
||||
else {
|
||||
|
||||
//Else we can remove from this class information about the signal being sent
|
||||
this.pending_signal = undefined;
|
||||
this.pending_signal_target = undefined;
|
||||
this.cancelCurrentSignal();
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user