Nir Soffer has posted comments on this change.
Change subject: json-rpc: Protocol detection
......................................................................
Patch Set 22:
(1 comment)
http://gerrit.ovirt.org/#/c/26300/22/vdsm/protocolDetector.py
File vdsm/protocolDetector.py:
Line 201: required_size = 7
Line 202:
Line 203: def __init__(self, json_binding):
Line 204: self.json_binding = json_binding
Line 205: self.reactor = self.json_binding.createStompReactor()
The reactor does not belong here - it is not the responsibility of a detector to create,
start or stop a reactor. This may work now, but break when you try to use another detector
with the same json_bindings - which detector will manage the reactor? what will happen if
this detector is disabled?
Line 206: self.json_binding.startReactor(self.reactor)
Line 207:
Line 208: def detect(self, data):
Line 209: return data.startswith("CONNECT") or
data.startswith("SEND")
--
To view, visit
http://gerrit.ovirt.org/26300
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Id739a40e2b37dcc175137ec91cd5ec166ad24a75
Gerrit-PatchSet: 22
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: Barak Azulay <bazulay(a)redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi(a)redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei(a)redhat.com>
Gerrit-Reviewer: Yeela Kaplan <ykaplan(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes