To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

Commit 60119ff3 authored by Reto Da Forno's avatar Reto Da Forno

ignore error when client disconnects from serial port

parent b7ca3d83
......@@ -18,6 +18,7 @@ scriptpath = '/home/flocklab/flocklab_bin/testmanagementserver'
sys.path.append(scriptpath + '/lib')
import daemon, flocklab
from flocklab import SUCCESS
from socket import error as socket_error
### Global variables ###
###
......@@ -386,6 +387,9 @@ class ProxyConnections():
try:
m = i.recv(1024)
logger.debug("received %d bytes from socket %s" % (len(m), str(i)))
except socket_error as serr:
# user probably disconnected, don't generate an error message
break
except Exception, e:
logger.error("error %s, %s" % (str(e), type(e)))
if m == '':
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment