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")