File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2061,13 +2061,16 @@ if (!window.console) {
20612061 ) ; //new Messaging.Client(conf.hosts[0],conf.ports[0],clientID);
20622062
20632063 messaging . client . onConnectionLost = function ( response ) {
2064- if (
2065- response . errorCode === 8 &&
2066- messaging . numOfConnectRetries >= messaging . maxConnectRetries
2067- ) {
2068- var errMsg = "Unable to connect via WebSocket - Invalid permissions" ;
2069- console . warn ( errMsg ) ;
2070- callback ( errMsg ) ;
2064+ if ( messaging . numOfConnectRetries >= messaging . maxConnectRetries ) {
2065+ if ( response . errorCode === 8 ) {
2066+ var errMsg = "Unable to connect via WebSocket - Invalid permissions" ;
2067+ console . warn ( errMsg ) ;
2068+ callback ( errMsg ) ;
2069+ } else {
2070+ var errMsg = "Disconnected via WebSocket. No longer attempting to reconnect" ;
2071+ console . warn ( errMsg ) ;
2072+ callback ( errMsg ) ;
2073+ }
20712074 } else {
20722075 console . log (
20732076 "ClearBlade Messaging connection lost- attempting to reestablish" ,
You can’t perform that action at this time.
0 commit comments