Change in vdsm[master]: stomp: make sure that subscriptions use uniqe id

piotr.kliczewski at gmail.com piotr.kliczewski at gmail.com
Thu Sep 24 07:59:27 UTC 2015


Piotr Kliczewski has uploaded a new change for review.

Change subject: stomp: make sure that subscriptions use uniqe id
......................................................................

stomp: make sure that subscriptions use uniqe id

There was a bug in the engine that there were two subscriptions with the
same id. This issue as a result created fd leak because we were not able
to clean the subscription id on connection closed or unsubscribe.


Change-Id: I3883bb68134a6e2cc52cf54ce4027122db8150e9
Signed-off-by: pkliczewski <piotr.kliczewski at gmail.com>
---
M lib/yajsonrpc/stompreactor.py
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/56/46656/1

diff --git a/lib/yajsonrpc/stompreactor.py b/lib/yajsonrpc/stompreactor.py
index 71fd2ab..7e74708 100644
--- a/lib/yajsonrpc/stompreactor.py
+++ b/lib/yajsonrpc/stompreactor.py
@@ -133,6 +133,11 @@
                              dispatcher.connection)
             return
 
+        if sub_id in self._sub_ids.keys():
+            self._send_error("Subscription id already exists",
+                             dispatcher.connection)
+            return
+
         ack = frame.headers.get("ack", stomp.AckMode.AUTO)
         subscription = stomp._Subscription(dispatcher.connection, destination,
                                            sub_id, ack, None)


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3883bb68134a6e2cc52cf54ce4027122db8150e9
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski at gmail.com>


More information about the vdsm-patches mailing list