defaultShouldReconnect
The default of
shouldReconnect
: a normal closure (1000) means the server finished on purpose, so the socket stays
closed until
connect()
or
reconnect()
. Every other loss - another close code, an error, a timeout - is retried.
Import
import { defaultShouldReconnect } from "@hyper-fetch/sockets"
Source
Package
Parameters
defaultShouldReconnect(loss: ConnectionLossType)
Parameters
| Name | Type | Description |
|---|---|---|
| loss | |
Returns
boolean

