I've checked into CVS the changes you suggested -- I added the setsockopt 
call, moved up the initialization of self.threadCount and 
self.threadUseCounter, and removed the annoying print ".".  Can you update 
your copy of ThreadedAppServer.py from CVS and verify that it fixes the 
problem?

I can confirm that it still works properly on WinNT.

At 04:10 PM 10/18/01 -0400, you wrote:
>To fix the bind error, in ThreadedAppServer.__init__:
>Change:
>                 self.mainsocket = socket.socket(socket.AF_INET,
>socket.SOCK_STREAM)
>To:
>                 self.mainsocket = socket.socket(socket.AF_INET,
>socket.SOCK_STREAM)
>
>self.mainsocket.setsockopt(socket.SOL_SOCKET,socket.SO_REUSEADDR,1)
>
>I was under the impression that SO_REUSEADDR was not risky to use but
>after poking around some more I found that for servers binding to a well
>known port, it should be used.  The following post also explains why
>webkit owns the connections instead of the adaptor: it just depends
>which side of the connection closes first.
>
>Jeff
>
>PS: the two lines:
>                 self.threadCount=0
>                 self.threadUseCounter=[]
>should be moved above the exception handler for the bind or the shutdown
>call raises an exception.

--

- Geoff Talvola
   [EMAIL PROTECTED]

_______________________________________________
Webware-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-devel

Reply via email to