[Twisted-Python] UNIXServer and its socket
In my application I have a server that listens on a UNIX socket. When I kill the application, the socket file remains in the filesystem so when I restart it I always achieve an "Address already in use" error. Should I delete it manually any time I stop the application or is there a more elegant way to solve this problem? The application is a plugin for twistd. Thank you in advance. Matteo
On Tue, 18 Nov 2003, Matteo Giacomazzi
In my application I have a server that listens on a UNIX socket. When I kill the application, the socket file remains in the filesystem so when I restart it I always achieve an "Address already in use" error.
I'm guessing you're using 1.1? It's fixed in CVS, so when there is a new release, it will be fixed. I'm not sure what your best course of action, though: * Live with it, and wait for new release * Move to CVS, wait for new release to move back to released version * Implement some work around, wait for new release to remove it I'm sorry there aren't better news than "it was a bug, we fixed it" -- twisted.application is quite a bit of code, and testing in the field frequently finds more bugs. You can rest assured that the bug was not merely fixed, but a unit test added to make sure it doesn't come back.
In my application I have a server that listens on a UNIX socket. When I kill the application, the socket file remains in the filesystem so when I restart it I always achieve an "Address already in use" error.
I'm guessing you're using 1.1?
Right!
It's fixed in CVS, so when there is a new release, it will be fixed. I'm not sure what your best course of action, though: * Live with it, and wait for new release * Move to CVS, wait for new release to move back to released version * Implement some work around, wait for new release to remove it
I will take option number 1. If I'm not wrong, in version 1.0.7 this error didn't appear.
I'm sorry there aren't better news than "it was a bug, we fixed it" -- twisted.application is quite a bit of code, and testing in the field frequently finds more bugs. You can rest assured that the bug was not merely fixed, but a unit test added to make sure it doesn't come back.
That's good, thank you: I will wait for next release. Regards, Matteo
On Tue, Nov 18, 2003 at 12:36:19PM +0100, Matteo Giacomazzi wrote:
It's fixed in CVS, so when there is a new release, it will be fixed. I'm not sure what your best course of action, though: * Live with it, and wait for new release * Move to CVS, wait for new release to move back to released version * Implement some work around, wait for new release to remove it
I will take option number 1. If I'm not wrong, in version 1.0.7 this error didn't appear.
That sounds likely. twisted.application, and the associated changes to twistd and other infrastructure, were new to 1.1. -Andrew.
participants (3)
-
Andrew Bennetts
-
Matteo Giacomazzi
-
Moshe Zadka