Opened 15 years ago
Closed 15 years ago
#3317 closed defect (fixed)
Comet listeners are not removed when the connection is closed
Reported by: | guest | Owned by: | alex |
---|---|---|---|
Priority: | high | Milestone: | 0.9beta |
Component: | Dojox | Version: | 0.9 |
Keywords: | comet, cometd, publish, connect | Cc: | |
Blocked By: | Blocking: |
Description
When a script invokes cometd subscribe, a listener is added for this channel in dojo. However these listener are not invalidated when the server closes the connection. This causes the handlers called multiple times on reconnect.
I am not sure if it is the really intended behaviour.
Step to reproduce : function connect() {
dojox.cometd.init(null, "/comet/cometd"); dojox.cometd.subscribe("/messages", null, function(obj) {console.debug("Message from the server :", obj);}
}
function disconnect() {
dojox.cometd.disconnect();
}
function publish() {
request = {message:"New message"}; dojox.cometd.publish("/messages", request);
}
connect(); disconnect(); connect(); publish();
The publish will fire the handler twice.
Change History (2)
comment:1 Changed 15 years ago by
Owner: | changed from Tom Trenka to alex |
---|---|
severity: | major → normal |
comment:2 Changed 15 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
(In [9410]) ensuring that disconnect cleans out subscriptions and backlogs. Fixes #3317