core.reconnectingwebsocket.reconnect | Medplum
ReconnectingWebSocket.reconnect() method
Closes the WebSocket connection or connection attempt and connects again. Resets retry counter;
Signature:
reconnect(code?: number, reason?: string): void;
Parameters [](/content/docs/sdk/core.reconnectingwebsocket.reconnect#parameters "Direct link to Parameters"/index.html)
| 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