Browse Source

don't crash in case a frame cannot be sent

master
Fr3deric 6 years ago
parent
commit
2f8df5467d
  1. 6
      utils/blphub.py

6
utils/blphub.py

@ -69,7 +69,11 @@ class BLPHub(): @@ -69,7 +69,11 @@ class BLPHub():
self.__lastFrameTimeout = (
currentTime + self.__streams[stream]['timeout']
)
self.__output.sendFrame(frame)
try:
self.__output.sendFrame(frame)
except Exception as e:
# TODO better error handling
print('could not send frame: %s' % (repr(e)))
return True
return False

Loading…
Cancel
Save