Skip to content

about strategy of socket closed  #8

@huangwei1024

Description

@huangwei1024

HI,
when ClientSocket was closed, I think the Session._request_table were no longer necessary.
future under current strategy will be wait until timeout, but if Client set timeout None, when socket closed, there will be endless wait.

    def on_close(self, sock):
        # Avoid calling self.on_connect_failed after self.close called.
        if self._closed:
            return

        # if sock in self._sockets:
        #     self._sockets.remove(sock)
        #     self._connecting = 0
        # else:
        # Tornado does not have on_connect_failed event.
        self.on_connect_failed(sock)

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions