Skip to content

Race condition in sync implemention delays closing connections #1596

Open
@aaugustin

Description

@aaugustin

When this line:

data = self.socket.recv(self.recv_bufsize)

runs before this line:

connection.close_socket()

closing the socket doesn't interrupt recv() because recv() isn't running in the main thread — and interruption is based on signals which are only received by the main thread.

First discovered in #1592.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions