Commit a839ee8d authored by Denis Bilenko's avatar Denis Bilenko

GreenSocket.connect: use gethostname explicitly

parent e7964440
......@@ -213,6 +213,8 @@ class GreenSocket(object):
setattr(self, method, dummy)
def connect(self, address):
if isinstance(address, tuple) and len(address)==2:
address = gethostbyname(address[0]), address[1]
if self.timeout==0.0:
return self.fd.connect(address)
fd = self.fd
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment