Note that the connect() operation is subject to the timeout setting,
and in general it is recommended to call settimeout() before calling
connect() or pass a timeout parameter to create_connection(). The
system network stack may return a connection timeout error of its own
regardless of any Python socket timeout setting.
请看一下这个answer,这里显示了如何设置
timeout
。你知道吗从documentation可以看出
setSocketTimeout
和setConnectTimeout
在Python中是相同的东西。你知道吗相关问题 更多 >
编程相关推荐