Opened 12 years ago

Closed 11 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 alex)

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 (5)

comment:1 Changed 12 years ago by Tom Trenka

Owner: changed from Tom Trenka to alex

comment:2 Changed 11 years ago by dylan

Milestone: 1.2

comment:3 Changed 11 years ago by alex

Component: DojoxDojoX Cometd
Description: modified (diff)

comment:4 Changed 11 years ago by dylan

Owner: changed from alex to dylan
Status: newassigned

comment:5 Changed 11 years ago by dylan

Resolution: wontfix
Status: assignedclosed

useLocalTopics was removed in [10664]. I assume there is a reason/alternative, though I don't know yet what that is.

Note: See TracTickets for help on using tickets.