Opened 13 years ago
Closed 13 years ago
#4485 closed defect (wontfix)
attempting to subscribe to a cometd channel without local topics can fail
Reported by: | guest | Owned by: | dylan |
---|---|---|---|
Priority: | high | Milestone: | 1.2 |
Component: | DojoX Cometd | Version: | 0.9 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description (last modified by )
Attempting to subscribe to a cometd channel with 'useLocalTopics' set to false in the Init() function will fail.
All browsers, using revision 10539 from SVN.
Steps to reproduce: Initialize a connection to a cometd server. Subscribe to a cometd channel with useLocalTopics set to false: dojox.cometd.subscribe(channel, false, this,"HandleMessage?"); The server will issue commands, but the client will never receive them.
Cause: 'useLocalTopics' is spelled 'useLocalTopcis', and a logical OR is used instead of a logical AND to check if the variable is an object.
Patch: (sorry, I didn't see a way to attach it, so I just pasted it instead) Index: cometd.js =================================================================== --- cometd.js (revision 10539) +++ cometd.js (working copy) @@ -274,7 +274,7 @@
return;
}
(useLocalTopcis !== false)){ |
+ if((useLocalTopics !== true)&&(useLocalTopics !== false)){
similar to: function(channel, objOrFunc, funcName, useLocalTopics); var ofn = funcName; funcName = objOrFunc;
I hope this is an acceptable way of submitting this - I couldn't find another. Also, apoligies if I am misunderstanding the intended logic in that statement, but I didn't see the use if it was performing a !A OR A.
Thanks for the great project! Colin Alworth
Change History (5)
comment:1 Changed 13 years ago by
Owner: | changed from Tom Trenka to alex |
---|
comment:2 Changed 13 years ago by
Milestone: | → 1.2 |
---|
comment:3 Changed 13 years ago by
Component: | Dojox → DojoX Cometd |
---|---|
Description: | modified (diff) |
comment:4 Changed 13 years ago by
Owner: | changed from alex to dylan |
---|---|
Status: | new → assigned |
comment:5 Changed 13 years ago by
Resolution: | → wontfix |
---|---|
Status: | assigned → closed |
useLocalTopics was removed in [10664]. I assume there is a reason/alternative, though I don't know yet what that is.