def recv_into(self, *args):
sock = self._sock
while True:
try:
return sock.recv_into(*args)
except error, ex:
if ex[0] == EBADF:
return 0
if ex[0] != EWOULDBLOCK or self.timeout == 0.0:
raise
sys.exc_clear()
try:
wait_read(sock.fileno(), timeout=self.timeout, event=self._read_event)
except error, ex:
if ex[0] == EBADF:
return 0
raise
评论列表
文章目录