Opened 13 years ago

Last modified 12 years ago

#4485 closed defect

attempting to subscribe to a cometd channel without local topics can fail — at Initial Version

Reported by: guest Owned by: Tom Trenka
Priority: high Milestone: 1.2
Component: DojoX Cometd Version: 0.9
Keywords: Cc:
Blocked By: Blocking:


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 @@



if((useLocalTopics !== true)
(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 (0)

Note: See TracTickets for help on using tickets.