mirror of
https://github.com/nvms/prsm.git
synced 2025-12-16 16:10:54 +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);
|
}, 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() {
|
disconnect() {
|
||||||
this.options.shouldReconnect = false;
|
this.options.shouldReconnect = false;
|
||||||
|
|
||||||
@ -107,7 +112,7 @@ export class KeepAliveClient extends EventTarget {
|
|||||||
clearTimeout(this.pingTimeout);
|
clearTimeout(this.pingTimeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
async reconnect() {
|
private async reconnect() {
|
||||||
if (this.isReconnecting) {
|
if (this.isReconnecting) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user