problem with SocketServer -- address already in use
Fredrik Lundh
fredrik at pythonware.com
Tue Jul 13 18:38:10 EDT 1999
Phil Hunt <philh at vision25.demon.co.uk> wrote:
> I'm trying to use SocketServer.py to write a TCP server. I ran
> my program with ``python serv.py'', which went into an infinite
> loop (which is what it should do). I exited my program with ^Z,
> and tried to start it up again. I got an error message:
>
> socket.error: (98, 'Address already in use')
>
> which I presume is because something thinks the old invokation of
> my program is still using port 7070.
>
> How do I clear the port, before I start up my server?
use setsockopt to enable local address reuse; see
http://www.deja.com/getdoc.xp?AN=484041505&fmt=text
for an example.
</F>
More information about the Python-list
mailing list