message: Quit on timeout
diff: @@ -38,12 +38,18 @@ if __name__ == '__main__':
  # This will block (wait) until a client connets
  conn, addr = sock.accept()
  + conn.settimeout(1)
  +
  dump('Got a connection!')
  while True:
  + try:
  imgbytes = conn.recv(ROWS*COLS*4)
  + except Exception: # likely a timeout
  + break
  +
  if len(imgbytes) == ROWS*COLS*4:
  rgba_image = np.reshape(np.frombuffer(imgbytes, 'uint8'), (ROWS, COLS, 4))
  