mirror of
https://github.com/nvms/prsm.git
synced 2025-12-16 00:00:52 +00:00
private reconnect, docs for disconnect
This commit is contained in:
parent
d8565d488c
commit
116b4da850
@ -97,6 +97,11 @@ export class KeepAliveClient extends EventTarget {
|
||||
}, this.options.pingTimeout + this.options.maxLatency);
|
||||
}
|
||||
|
||||
/**
|
||||
* Disconnect the client from the server.
|
||||
* The client will not attempt to reconnect.
|
||||
* To reconnect, create a new KeepAliveClient.
|
||||
*/
|
||||
disconnect() {
|
||||
this.options.shouldReconnect = false;
|
||||
|
||||
@ -107,7 +112,7 @@ export class KeepAliveClient extends EventTarget {
|
||||
clearTimeout(this.pingTimeout);
|
||||
}
|
||||
|
||||
async reconnect() {
|
||||
private async reconnect() {
|
||||
if (this.isReconnecting) {
|
||||
return;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user