Opened 6 years ago

Closed 6 years ago

#18805 closed defect (duplicate)

Dojox Socket Reconnect options

Reported by: j105rob Owned by: dylan
Priority: undecided Milestone: 1.11
Component: Dojox Version: 1.10.4
Keywords: Cc:
Blocked By: Blocking:


TypeError?: Cannot read property 'reconnectTime' of undefined(…) "in domReady callback" "TypeError?: Cannot read property 'reconnectTime' of undefined

options parameter reconnectTime referenced before assignment.

options = options || {}; 

above line should be before reference to options.reconnectTime.

dxSocket.Reconnect = function(socket, options){
                // summary:
                //              Provides auto-reconnection to a websocket after it has been closed
                // socket:
                //              Socket to add reconnection support to.
                // returns:
                //              An object that implements the WebSocket API
                // example:
                //              You can use the Reconnect module:
                //              | require["dojox/socket", "dojox/socket/Reconnect"], function(dxSocket, reconnect){
                //              |    var socket = dxSocket({url:"/comet"});
                //              |    // add auto-reconnect support
                //              |    socket = reconnect(socket);
                var reconnectTime = options.reconnectTime || 10000;
                var checkForOpen, newSocket;
                options = options || {};

Change History (1)

comment:1 Changed 6 years ago by dylan

Milestone: tbd1.11
Resolution: duplicate
Status: newclosed

This is already fixed in master and was backported for releases such as 1.10.5 which will come soon. See

Note: See TracTickets for help on using tickets.