Skip to content

Server should check socket state before calling 'send' method #44

@coderNeos

Description

@coderNeos

return socket.send(CircularJSON.stringify(response), msg_options)

In case if client socket closes the connection - 'send' will cause an unhandled rejection, which in some production environments might lead to application crash!

Mentioned problem is relevant to any other socket.send call.

Steps to reproduce:

  1. Call some long running rpc task
  2. Close client connection
  3. After task has finished - unhandledRejection will be triggered

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions