File tree 1 file changed +8
-9
lines changed
1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -106,11 +106,7 @@ Protocol.prototype._enqueue = function(sequence) {
106
106
107
107
if ( this . _queue . length === 1 ) {
108
108
this . _parser . resetPacketNumber ( ) ;
109
- if ( sequence . constructor == Sequences . ChangeUser ) {
110
- sequence . start ( this . _handshakeInitializationPacket ) ;
111
- } else {
112
- sequence . start ( ) ;
113
- }
109
+ this . _startSequence ( sequence ) ;
114
110
}
115
111
116
112
return sequence ;
@@ -231,12 +227,15 @@ Protocol.prototype._dequeue = function() {
231
227
232
228
this . _parser . resetPacketNumber ( ) ;
233
229
234
- if ( sequence . constructor == Sequences . ChangeUser ) {
230
+ this . _startSequence ( sequence ) ;
231
+ } ;
232
+
233
+ Protocol . prototype . _startSequence = function ( sequence ) {
234
+ if ( sequence . constructor === Sequences . ChangeUser ) {
235
235
sequence . start ( this . _handshakeInitializationPacket ) ;
236
- return ;
236
+ } else {
237
+ sequence . start ( ) ;
237
238
}
238
-
239
- sequence . start ( ) ;
240
239
} ;
241
240
242
241
Protocol . prototype . handleNetworkError = function ( err ) {
You can’t perform that action at this time.
0 commit comments