retry on first EPIPE

This commit is contained in:
benoitc 2010-02-25 13:22:43 +01:00
parent cf7322ca43
commit 096da6ee39

View File

@ -117,6 +117,8 @@ def write(sock, data):
except socket.error, e:
if e[0] in (errno.EWOULDBLOCK, errno.EAGAIN):
break
if e[0] == errno.EPIPE and i == 0:
continue
raise
i += 1