Change in vdsm[master]: jsonrpc: check whether the connection is still open before p...

ybronhei at redhat.com ybronhei at redhat.com
Thu Sep 17 08:53:47 UTC 2015


Yaniv Bronhaim has posted comments on this change.

Change subject: jsonrpc: check whether the connection is still open before processing
......................................................................


Patch Set 1:

(1 comment)

sorry, missed my comment

https://gerrit.ovirt.org/#/c/42920/1/lib/yajsonrpc/__init__.py
File lib/yajsonrpc/__init__.py:

Line 507: 
Line 508:         try:
Line 509:             if ctx.connection.is_closed():
Line 510:                 self.log.warning("Ignoring message connection already closed")
Line 511:                 return
> This can happen when a client which send the request is not waiting on resp
so why not to do it as first thing when getting into _serveRequest - or even before the call to it. the connection can get closed arbitrary so you'll never cover all areas. not sure this is the right solution to check it once here
Line 512:             params = req.params
Line 513:             server_address = ctx.connection.get_local_address()
Line 514:             self._bridge.register_server_address(server_address)
Line 515:             if isinstance(req.params, list):


-- 
To view, visit https://gerrit.ovirt.org/42920
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I53c175882576eded3d4ad1c952148879efe2075e
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list