View Single Post
Old Jul 18th, 2006, 3:32 PM   #4
Arevos
Programming Guru
 
Arevos's Avatar
 
Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 5 Arevos is on a distinguished road
Even if the socket was accessable directly from the server, it's the listening socket, not the connecting one, so it would have no effect.

I've looked through the code, and in 2.1.0 at least, there is no timeout set on the connecting socket. Nor is any default timeout set in the CherryPy source, according to a quick grep I ran.

So try putting this at the top of your code:
import socket
socket.setdefaulttimeout(20)
(20 being the number of seconds your application will wait for a response before timing out - I believe 10 is the default).

This is assuming that the timeout takes place at the TCP layer, of course.
Arevos is offline   Reply With Quote