Log exception occurring while sending RPC errors to clients.
This commit is contained in:
parent
042ddd2891
commit
4d4c6404b1
|
@ -246,6 +246,7 @@ class DelugeRPCProtocol(Protocol):
|
|||
Sends an error response with the contents of the exception that was raised.
|
||||
"""
|
||||
exceptionType, exceptionValue, exceptionTraceback = sys.exc_info()
|
||||
try:
|
||||
self.sendData((
|
||||
RPC_ERROR,
|
||||
request_id,
|
||||
|
@ -254,6 +255,11 @@ class DelugeRPCProtocol(Protocol):
|
|||
exceptionValue._kwargs,
|
||||
"".join(traceback.format_tb(exceptionTraceback))
|
||||
))
|
||||
except Exception, err:
|
||||
log.error("An exception occurred while sending RPC_ERROR to "
|
||||
"client. Error to send(exception goes next): %s",
|
||||
"".join(traceback.format_tb(exceptionTraceback)))
|
||||
log.exception(err)
|
||||
|
||||
if method == "daemon.info":
|
||||
# This is a special case and used in the initial connection process
|
||||
|
|
|
@ -189,14 +189,14 @@ class Torrent(object):
|
|||
else:
|
||||
self.owner = owner
|
||||
|
||||
# Keep trac of last seen complete
|
||||
# Keep track of last seen complete
|
||||
if state:
|
||||
self._last_seen_complete = state.last_seen_complete or 0.0
|
||||
else:
|
||||
self._last_seen_complete = 0.0
|
||||
|
||||
# Keep track if we're forcing a recheck of the torrent so that we can
|
||||
# repause it after its done if necessary
|
||||
# re-pause it after its done if necessary
|
||||
self.forcing_recheck = False
|
||||
self.forcing_recheck_paused = False
|
||||
|
||||
|
@ -359,7 +359,7 @@ class Torrent(object):
|
|||
# Set the tracker list in the torrent object
|
||||
self.trackers = trackers
|
||||
if len(trackers) > 0:
|
||||
# Force a reannounce if there is at least 1 tracker
|
||||
# Force a re-announce if there is at least 1 tracker
|
||||
self.force_reannounce()
|
||||
|
||||
self.tracker_host = None
|
||||
|
|
Loading…
Reference in New Issue