liamzebedee
liamzebedee

Reputation: 14490

Why isn't SO_REUSEADDR working for multiprocessing.Listener?

I'm building an application that communicates with another script using the Listener/Client classes of the multiprocessing package.

I can successfully create both the listener and client, and communicate, however I am still receiving the lasting effects of the TCP TIME-WAIT - after I rerun the script I get the exception when instantiating the listener:

[Errno 98] Address already in use

I have no idea why this is happening, because as far as I know, by default SO_REUSEADDR is set in the constructor for Listener (see Lib/multiprocessing/connection.py).

I'm running Ubuntu 12.10 and using Python 2.7.

Upvotes: 1

Views: 412

Answers (1)

John Lyon
John Lyon

Reputation: 11440

This normally happens when you don't close the socket cleanly. Can you post some code showing that you're closing the socket cleanly, even if you force-close your application?

Upvotes: 2

Related Questions