kopia lustrzana https://github.com/glidernet/python-ogn-client
Catch ConnectionResetError (fixes #52)
rodzic
485282ea3b
commit
84dbfdecdb
|
@ -72,8 +72,8 @@ class AprsClient:
|
||||||
break
|
break
|
||||||
|
|
||||||
callback(packet_str)
|
callback(packet_str)
|
||||||
except BrokenPipeError:
|
except ConnectionError:
|
||||||
self.logger.error('BrokenPipeError', exc_info=True)
|
self.logger.error('ConnectionError', exc_info=True)
|
||||||
except socket.error:
|
except socket.error:
|
||||||
self.logger.error('socket.error', exc_info=True)
|
self.logger.error('socket.error', exc_info=True)
|
||||||
except UnicodeDecodeError:
|
except UnicodeDecodeError:
|
||||||
|
|
|
@ -59,6 +59,8 @@ class AprsClientTest(unittest.TestCase):
|
||||||
'... show must go on',
|
'... show must go on',
|
||||||
BrokenPipeError(),
|
BrokenPipeError(),
|
||||||
'... and on',
|
'... and on',
|
||||||
|
ConnectionResetError(),
|
||||||
|
'... and on',
|
||||||
socket.error(),
|
socket.error(),
|
||||||
'... and on',
|
'... and on',
|
||||||
'',
|
'',
|
||||||
|
|
Ładowanie…
Reference in New Issue