Commit 3f5f7e09 authored by Denis Bilenko's avatar Denis Bilenko

socket: improve readability

parent 64346c44
......@@ -260,7 +260,6 @@ class socket(object):
def accept(self):
if self.timeout == 0.0:
return self.fd.accept()
fd = self.fd
while True:
try:
res = self.fd.accept()
......@@ -272,7 +271,7 @@ class socket(object):
if res is not None:
client, addr = res
return type(self)(_sock=client), addr
wait_read(fd.fileno(), timeout=self.timeout)
wait_read(self.fd.fileno(), timeout=self.timeout)
def close(self):
self.fd = _closedsocket()
......
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