Piotr Kliczewski has posted comments on this change.

Change subject: stomp: make sure to send error message when no subscription
......................................................................


Patch Set 2:

(2 comments)

https://gerrit.ovirt.org/#/c/43724/2/lib/yajsonrpc/stompreactor.py
File lib/yajsonrpc/stompreactor.py:

Line 193:                 self._send_error("Subscription not available",
Line 194:                                  dispatcher.connection)
Line 195:                 return
Line 196: 
Line 197:             if len(subs) == 0:
> if not subs:
Done
Line 198:                 self._send_error("Subscription not available",
Line 199:                                  dispatcher.connection)
Line 200:                 return
Line 201: 


Line 196: 
Line 197:             if len(subs) == 0:
Line 198:                 self._send_error("Subscription not available",
Line 199:                                  dispatcher.connection)
Line 200:                 return
> How do we have empty subs list? Maybe a better fix would be to never hold a
It is expected behavior. If there was no-one who subscribed for particular 
destination we will have empty list. We need to make sure that we cover cases 
like this.
Line 201: 
Line 202:             for subscription in subs:
Line 203:                 headers = utils.picklecopy(frame.headers)
Line 204:                 headers = {stomp.Headers.SUBSCRIPTION: 
subscription.id}


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I1880caa04bb5e506679da046a58491d3e29e10e2
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <piotr.kliczew...@gmail.com>
Gerrit-Reviewer: Dima Kuznetsov <dkuzn...@redhat.com>
Gerrit-Reviewer: Francesco Romani <from...@redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsof...@redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczew...@gmail.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybron...@redhat.com>
Gerrit-Reviewer: Yeela Kaplan <ykap...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to