Releases: SocketCluster/socketcluster-client
Releases · SocketCluster/socketcluster-client
v6.1.0
- Fixed a bug which was causing event callbacks to always timeout with an error when the client socket's
cloneData
option was set to true.
Breaking change:
- A new BadConnectionError type was added - Now, if a connection fails or is aborted, all pending events will be aborted and their callbacks will be invoked with a BadConnectionError error as the first argument.
This will allow failed events to be handled sooner which may have implications when it comes to recovering from server crashes.
v5.5.2
v5.5.1
v5.5.0
v5.3.0
- You can now specify
autoConnect: false
as an option tovar socket = socketCluster.connect(options)
- If it is false, the socket will not start connecting to the server until you invokesocket.connect()
explicitly. - Added a new
'connecting'
event which gets triggered whenever the socket starts connecting to the server - This includes reconnects. Note that if you want to capture the very first'connecting'
event, you will need to setautoConnect
to false and register your event handler before you callsocket.connect()
.
v5.2.4
v5.2.3
v5.2.2
v5.2.1
v5.2.0
When using emit, publish, etc... It will clone the input data by default.
Before, if the socket was disconnected and you published/emitted an object (by reference) and then changed it immediately after the function was called, then by the time the connection was re-established, it would emit the modified object instead of the object as it appeared at the time the emit/publish was invoked.
You can set the 'cloneData' option to false (from socketCluster.connect(options)
) to turn this off.