Hi all!
I have an app using pygtk and in a separate thread I have a server responding to specific calls on port 1120. Everything works fine except one thing: When I exit my app, everything shuts own properly but if I start up my app again right after (and the following couple of minutes) I get the error: (98, 'Address already busy') on code line 1:
socket.bind(('', 1120))
server.listen(5)
To me it seems as if the port is not released properly at shutdown, am I right?
How do I make port release at shutdown?
I have done as you should in pygtk:
import gobject
gobject.threads_init()
all my client calls are also closed with:
socket.close()
and at the server end at closedown:
socket.close()
and in my main thread:
self.__server.join()
gtk.main_quit()
I have checked that my thread self.__server.isAlive() is false before gtk quit.
What am I missing?
Please help!
Many thanks
Marcux