the background of the program.
A HTTP server is front end for a Fileserver and use Pyro RMI to load / write files on the Fileserver. before a client is allowed access to the files a security handshake must be done. It all works when I run it. Now I would like to have the HTTP server run threaded so it can handle multiple clients at once.
I change the connection accepting part in the HTTP server from
while(True):
try:
channel = serverSocket.accept()
ServerHandshake(channel[0],channel[1])
To
while(True):
try:
channel = serverSocket.accept()
thread.start_new_thread(ServerHandshake,(channel[0],channel[1]))
It all goes fine through the handshake and until it is time to make the Pyro proxy for the command, I have 3 lines like:
print 'in getfunc just before proxy'
PP = Pyro.core.getProxyForURI("PYROLOC://127.0.1.1:7766/FSClass")
print 'proxy made'
And the thread stalls after doing the first print, when I give the program a CTRL+C keyboard interrupt it stops listening for new connections and any stalled threads do the second print and finish their operation correctly.
Does anyone have an idea what can be going wrong ? I am personally all out of ideas by now.