core.reconnectingwebsocket.reconnect
Home > @medplum/core > ReconnectingWebSocket > reconnect
ReconnectingWebSocket.reconnect() method
Closes the WebSocket connection or connection attempt and connects again. Resets retry counter;
Signature:
reconnect(code?: number, reason?: string): void;
Parameters
Parameter | Type | Description |
---|---|---|
code | number | (Optional) The code to disconnect with. Default is 1000. |
reason | string | (Optional) An optional reason for disconnecting the connection. |
Returns:
void