'Address already in use' when using socket
J Berends
j.p.t.j.berends at [N0SP4M].nl
Fri Apr 8 05:38:53 EDT 2005
Peter Hansen wrote:
> Bearish wrote:
>
>> I get 'Address already in use' errors when using sockets.
>
>
> Generally one can fix this using:
>
> sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
>
> where "sock" is the server socket in question. Do
> this prior to attempting to bind to the port.
>
> -Peter
I agree on this, wanted to write the same thing when I saw this.
More information about the Python-list
mailing list