@@ -117,7 +117,7 @@ class Connection extends EventEmitter {
117
117
handshakeCommand . on ( 'end' , ( ) => {
118
118
// this happens when handshake finishes early either because there was
119
119
// some fatal error or the server sent an error packet instead of
120
- // an hello packet (for example, 'Too many connactions ' error)
120
+ // an hello packet (for example, 'Too many connections ' error)
121
121
if ( ! handshakeCommand . handshake || this . _fatalError || this . _protocolError ) {
122
122
return ;
123
123
}
@@ -131,9 +131,9 @@ class Connection extends EventEmitter {
131
131
} ) ;
132
132
this . addCommand ( handshakeCommand ) ;
133
133
}
134
- // in case there was no initiall handshake but we need to read sting, assume it utf-8
134
+ // in case there was no initial handshake but we need to read sting, assume it utf-8
135
135
// most common example: "Too many connections" error ( packet is sent immediately on connection attempt, we don't know server encoding yet)
136
- // will be overwrittedn with actial encoding value as soon as server handshake packet is received
136
+ // will be overwritten with actual encoding value as soon as server handshake packet is received
137
137
this . serverEncoding = 'utf8' ;
138
138
if ( this . config . connectTimeout ) {
139
139
const timeoutHandler = this . _handleTimeoutError . bind ( this ) ;
@@ -561,7 +561,7 @@ class Connection extends EventEmitter {
561
561
this . _paused = false ;
562
562
while ( ( packet = this . _paused_packets . shift ( ) ) ) {
563
563
this . handlePacket ( packet ) ;
564
- // don't resume if packet hander paused connection
564
+ // don't resume if packet handler paused connection
565
565
if ( this . _paused ) {
566
566
return ;
567
567
}
0 commit comments