Skip to content

Disconnect event takes considerable time #753

@colingoodman

Description

@colingoodman

I am honestly uncertain on where this ought to properly go, however I believe the latest socketio release may be related.

Describe the bug
It is taking considerable time (60 seconds) for the "disconnect" event to be hit after a client breaks their connection. This was practically instantaneous as of a few days ago.

To Reproduce

  1. Client socket connection is created.
  2. Client breaks the connection.

Expected behavior
The "disconnect" event provided by socketio should be triggered as soon as the socket connection is broken.

Logs
This may or may not be related, but this message has been appearing in the flask logs on startup:

The WebSocket transport is not available, you must install a WebSocket server that is compatible with your async mode to enable it. See the documentation for details. (further occurrences of this error will be logged with level INFO)

Googling around, previous issues seem to indicate that we need to install gevent or eventlet, but we already have these packages installed. A similar message in the logs points us to something called simple-webserver, but we (also) have this installed.

Additional context
We had been using the "disconnect" event provided by socketio to detect when a socket was broken by a client. We tested a version of our code from a week ago in which everything was fine, and the current problem persisted. We presume that an underlying dependency somewhere may have changed something.

It is highly probable that this is a bug caused by something we are doing; any advice or potential fixes would be immensely appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions