add note about request.notifyFinish

This commit is contained in:
Jack 2016-08-03 17:49:13 -04:00
parent 64e9ce2bfa
commit fc50a3242f

View file

@ -419,7 +419,10 @@ class LBRYDaemon(jsonrpc.JSONRPC):
d = defer.maybeDeferred(function)
else:
d = defer.maybeDeferred(function, *args)
# cancel the response if the connection is broken
request.notifyFinish().addErrback(self._responseFailed, d)
d.addErrback(self._ebRender, id)
d.addCallback(self._cbRender, request, id, version)
return server.NOT_DONE_YET