Skip to content

Server.stop() fails to wait for 'bye' to complete before killing sockets. #97

@troppoli

Description

@troppoli

The server.stop call does three things without any synchronization:
sends out a bye
stops the advertise loop
closes sockets

The trouble is that _stop (closing sockets) is called without waiting for _send's callback to complete. So you will see the 'Sending a message to %s:%s' from _send, but you will don't see the 'Outgoing server message' from the completion in advertise. If I put a breakpoint before _stop, this message usually makes it out when I run.

I'm on win 10 with multiple NICs

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