Hi everyone,
I finally took the time to debug the hanging problem with restarts on
FreeBSD. The _closeThread thread is created in AppServer.__init__ and
then ThreadedAppServer.__init__ throws an exception on bind. Since the
contructor fails, server = None and the cleanup code in run() that would
have stopped _closeThread never runs.
BTW, I tested Tavis' new code, it can be restarted immediately whereas
with CVS Webware, I have to wait 15 seconds for the socket to close
down...
CHANGE THIS (ThreadedAppServer.py around line 77):
self.mainsocket = socket.socket(socket.AF_INET,
socket.SOCK_STREAM)
addr = self.address()
self.mainsocket.bind(addr)
print "Listening on", addr
TO THIS:
self.mainsocket = socket.socket(socket.AF_INET,
socket.SOCK_STREAM)
addr = self.address()
try:
self.mainsocket.bind(addr)
except:
if self.running:
self.initiateShutdown()
self._closeThread.join()
raise
print "Listening on", addr
Regards,
Jeff
_______________________________________________
Webware-devel mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/webware-devel