forked from M-Labs/artiq
coredevice/comm_tcp: more appropriate exception
This commit is contained in:
parent
bc7d06468f
commit
5853e31ac2
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue