From 5853e31ac27015403fcc0ad444e28d0decfc1f05 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sun, 26 Jun 2016 19:08:40 +0800 Subject: [PATCH] coredevice/comm_tcp: more appropriate exception --- artiq/coredevice/comm_tcp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/artiq/coredevice/comm_tcp.py b/artiq/coredevice/comm_tcp.py index 1ad7d3e8b..7c9395609 100644 --- a/artiq/coredevice/comm_tcp.py +++ b/artiq/coredevice/comm_tcp.py @@ -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