You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The @SocketSession consistently injects an empty Map when invoking the $onDisconnect handler. This issue arises due to the utilization of floating promises while invoking the handlers without awaiting the result before destroying the session. To rectify this problem, it is recommended to await the execution of the $onConnection and $onDisconnect methods.
Steps to reproduce:
Utilize the SocketIOModule.
Create a SocketService service, implementing the $onDisconnect event handler.
Inject the session into both $onDisconnect and $onConnection event handlers using the @SocketSession
Set something into the session on the $onConnection
Information
@tsed/socketio
The
@SocketSession
consistently injects an empty Map when invoking the$onDisconnect
handler. This issue arises due to the utilization of floating promises while invoking the handlers without awaiting the result before destroying the session. To rectify this problem, it is recommended to await the execution of the$onConnection
and$onDisconnect
methods.Steps to reproduce:
SocketIOModule
.SocketService
service, implementing the$onDisconnect
event handler.$onDisconnect
and$onConnection
event handlers using the@SocketSession
$onConnection
Example
Expected result:
The session must be preserved on the
$onDisconnect
.The text was updated successfully, but these errors were encountered: