Prev: How to print SRE_Pattern (regexp object) text for debuggingpurposes?
Next: [suds] how to convert a sudsobject into its representative XML?
From: AK on 17 Jun 2010 21:15
On 06/17/2010 08:59 PM, Grant Edwards wrote:
> On 2010-06-18, AK <ak(a)nothere.com> wrote:
>> Here it is:
>> Traceback (most recent call last):
>> File "./vimp3_player.py", line 112, in <module>
>> File "./vimp3_player.py", line 35, in main
>> File "./vimp3_player.py", line 41, in listen
>> s.bind((HOST, PORT))
>> File "<string>", line 1, in bind
>> socket.error: [Errno 98] Address already in use
> Setting the SO_REUSEADDR option should prevent that, and in my
> experience it always does. What OS are you using?
> Is there some reason you want to rebind each time? Why not just loop
> around the conn,addr = accept() .... con.close() section?
That solved it! Thanks!@ Interesting that closing and rebinding caused
this but not right away but after 3-4 connections. My OS is Ubuntu, by
the way. Thanks again, -ak