commit | 49c2f9fa076035d7fea9b45041a2f05b350de1df | [log] [tgz] |
---|---|---|
author | 侯锐 <hourui@qianmi.com> | Wed Aug 01 17:38:31 2018 +0800 |
committer | 侯锐 <hourui@qianmi.com> | Wed Aug 01 17:46:40 2018 +0800 |
tree | d6dd611b465a38e0c2f6ee705cfe592bcff4ac82 | |
parent | 5c92e3e0fbd43d3325dffedbcf0ce1df6549c0d2 [diff] |
添加创建连接时的超时设置
diff --git a/dubbo/connection/connections.py b/dubbo/connection/connections.py index 9e5a70a..7db132e 100644 --- a/dubbo/connection/connections.py +++ b/dubbo/connection/connections.py
@@ -318,6 +318,7 @@ def __init__(self, host, port): sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + sock.settimeout(5) sock.connect((host, port)) # 在创建好连接之后设置IO为非阻塞 sock.setblocking(False)