forked from M-Labs/artiq
1
0
Fork 0

coredevice/comm_tcp: more appropriate exception

This commit is contained in:
Sebastien Bourdeauducq 2016-06-26 19:08:40 +08:00
parent bc7d06468f
commit 5853e31ac2
1 changed files with 1 additions and 1 deletions

View File

@ -57,7 +57,7 @@ class Comm(CommGeneric):
while len(r) < length:
rn = self.socket.recv(min(8192, length - len(r)))
if not rn:
raise IOError("Connection closed")
raise ConnectionResetError("Connection closed")
r += rn
return r