@@ -63,7 +63,7 @@ function RedisClient (options, stream) {
6363 cnx_options . family = ( ! options . family && net . isIP ( cnx_options . host ) ) || ( options . family === 'IPv6' ? 6 : 4 ) ;
6464 this . address = cnx_options . host + ':' + cnx_options . port ;
6565 }
66- /* istanbul ignore next: travis does not work with stunnel atm. Therefor the tls tests are skipped on travis */
66+ /* istanbul ignore next: travis does not work with stunnel atm. Therefore the tls tests are skipped on travis */
6767 for ( var tls_option in options . tls ) { // jshint ignore: line
6868 cnx_options [ tls_option ] = options . tls [ tls_option ] ;
6969 }
@@ -220,7 +220,7 @@ RedisClient.prototype.create_stream = function () {
220220 this . stream . destroy ( ) ;
221221 }
222222
223- /* istanbul ignore if: travis does not work with stunnel atm. Therefor the tls tests are skipped on travis */
223+ /* istanbul ignore if: travis does not work with stunnel atm. Therefore the tls tests are skipped on travis */
224224 if ( this . options . tls ) {
225225 this . stream = tls . connect ( this . connection_options ) ;
226226 } else {
@@ -230,12 +230,13 @@ RedisClient.prototype.create_stream = function () {
230230
231231 if ( this . options . connect_timeout ) {
232232 this . stream . setTimeout ( this . connect_timeout , function ( ) {
233+ // Note: This is only tested if a internet connection is established
233234 self . retry_totaltime = self . connect_timeout ;
234235 self . connection_gone ( 'timeout' , new Error ( 'Redis connection gone from timeout event' ) ) ;
235236 } ) ;
236237 }
237238
238- /* istanbul ignore next: travis does not work with stunnel atm. Therefor the tls tests are skipped on travis */
239+ /* istanbul ignore next: travis does not work with stunnel atm. Therefore the tls tests are skipped on travis */
239240 var connect_event = this . options . tls ? 'secureConnect' : 'connect' ;
240241 this . stream . once ( connect_event , function ( ) {
241242 this . removeAllListeners ( 'timeout' ) ;
@@ -244,7 +245,7 @@ RedisClient.prototype.create_stream = function () {
244245 } ) ;
245246
246247 this . stream . on ( 'data' , function ( buffer_from_socket ) {
247- // The buffer_from_socket.toString() has a significant impact on big chunks and therefor this should only be used if necessary
248+ // The buffer_from_socket.toString() has a significant impact on big chunks and therefore this should only be used if necessary
248249 debug ( 'Net read ' + self . address + ' id ' + self . connection_id ) ; // + ': ' + buffer_from_socket.toString());
249250 self . reply_parser . execute ( buffer_from_socket ) ;
250251 self . emit_idle ( ) ;
@@ -400,12 +401,12 @@ RedisClient.prototype.on_ready = function () {
400401 this . pub_sub_mode = this . old_state . pub_sub_mode ;
401402 }
402403 if ( this . monitoring ) { // Monitor has to be fired before pub sub commands
403- this . internal_send_command ( 'monitor' , [ ] ) ;
404+ this . internal_send_command ( 'monitor' , [ ] ) ; // The state is still set
404405 }
405406 var callback_count = Object . keys ( this . subscription_set ) . length ;
406407 if ( ! this . options . disable_resubscribing && callback_count ) {
407408 // only emit 'ready' when all subscriptions were made again
408- // TODO: Remove the countdown for ready here. This is not coherent with all other modes and should therefor not be handled special
409+ // TODO: Remove the countdown for ready here. This is not coherent with all other modes and should therefore not be handled special
409410 // We know we are ready as soon as all commands were fired
410411 var callback = function ( ) {
411412 callback_count -- ;
@@ -680,7 +681,7 @@ function subscribe_unsubscribe (self, reply, type, subscribe) {
680681 } else {
681682 var running_command ;
682683 var i = 1 ;
683- // This should be a rare case and therefor handling it this way should be good performance wise for the general case
684+ // This should be a rare case and therefore handling it this way should be good performance wise for the general case
684685 while ( running_command = self . command_queue . get ( i ) ) {
685686 if ( SUBSCRIBE_COMMANDS [ running_command . command ] ) {
686687 self . command_queue . shift ( ) ;
0 commit comments