smart server emits traceback while get log via bzr protocol
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Fix Released
|
Medium
|
Andrew Bennetts |
Bug Description
I run smart server on the win32 machine, in the root of pack shared repo with following command:
bzr serve
Many commands works as expected, and even log command works, but each time command stops printing revisions I have traceback in the server console. But server itself still working and continue to respond on subsequent requests.
<bzrlib.
Exception in thread smart-server-child:
Traceback (most recent call last):
File "E:\Python24\
self.run()
File "E:\Python24\
self.
File "E:\Python24\
server_protocol = self._build_
File "E:\Python24\
d_protocol
bytes = self._get_line()
File "E:\Python24\
_line
new_char = self._get_bytes(1)
File "E:\Python24\
_bytes
return self.socket.
error: (10054, 'Connection reset by peer')
description: | updated |
It seems we are just not catching and suppressing the client disconnecting. We already trap for
except self._socket_ timeout:
# just check if we're asked to stop
pass
except self._socket_error, e:
# if the socket is closed by stop_background _thread
# we might get a EBADF here, any other socket errors
# should get logged.
if e.args[0] != errno.EBADF:
trace.warning( "listening socket error: %s", e)
I suppose it is also possible that it is the SmartServerSock etStreamMedium which needs the exception trapping.