I am using a number of different libraries, which each of which use different underlying ways to make socket connections, like urllib3, requests, and httplib. this is in python 2.7.5.
periodically, the program gets hung up in one of the libraries waiting for a network IO to complete.
I have tried socket.setdefaulttimeout(1.0) and socket._GLOBAL_DEFAULT_TIMEOUT = 1.0, and neither had any effect on my program.
what is the proper way to set a global socket timeout?