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
From examining the code handling the Subscribe message, it looks like it is possible for a custom async onOperation callback or schema function to delay long enough for a client to cancel the subscription before either returns. If that happens and an error occurs before the subscription starts, the server will still send an Error message for that stream.
# [5.16.0](v5.15.0...v5.16.0) (2024-03-27)
### Bug Fixes
* **server:** Return all subscriptions regardless of the return invocation order ([f442288](f442288))
* **server:** should not send error messages if socket closes before onSubscribe hooks resolves ([db47a66](db47a66)), closes [#539](#539)
### Features
* **server:** Close code and reason are optional ([6ae6e6f](6ae6e6f)), closes [#547](#547)
Each of the handler implementation in use/* have a check whether the socket is open before sending any messages. Nevertheless, I've added a fix in the server itself as well. It's released in v5.16.0.
From examining the code handling the
Subscribe
message, it looks like it is possible for a custom asynconOperation
callback orschema
function to delay long enough for a client to cancel the subscription before either returns. If that happens and an error occurs before the subscription starts, the server will still send anError
message for that stream.One obvious fix is to include a
notifyClient
parameter to theerror
function on the emit object, to match how thecomplete
function works.The text was updated successfully, but these errors were encountered: