File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ DDPClient.prototype._prepareHandlers = function() {
5858
5959 self . socket . on ( 'close' , function ( code , message ) {
6060 self . emit ( 'socket-close' , code , message ) ;
61- if ( self . auto_reconnect && ! self . _connectionFailed ) {
61+ if ( self . auto_reconnect && ! self . _connectionFailed && ! self . _isClosing ) {
6262 setTimeout ( function ( ) { self . connect ( ) ; } , self . auto_reconnect_timer ) ;
6363 }
6464 } ) ;
@@ -197,6 +197,7 @@ DDPClient.prototype._nextId = function() {
197197DDPClient . prototype . connect = function ( connected ) {
198198 var self = this ;
199199 self . _connectionFailed = false ;
200+ self . _isClosing = false ;
200201
201202 if ( connected ) {
202203 self . addListener ( "connected" , connected ) ;
@@ -214,7 +215,7 @@ DDPClient.prototype.connect = function(connected) {
214215
215216DDPClient . prototype . close = function ( ) {
216217 var self = this ;
217-
218+ self . _isClosing = true ;
218219 self . socket . close ( ) ;
219220} ;
220221
You can’t perform that action at this time.
0 commit comments