File tree Expand file tree Collapse file tree 1 file changed +11
-12
lines changed Expand file tree Collapse file tree 1 file changed +11
-12
lines changed Original file line number Diff line number Diff line change @@ -299,29 +299,28 @@ p.readSslResponse = function() {
299
299
} ;
300
300
301
301
p . parseMessage = function ( ) {
302
- var remaining = this . buffer . length - ( this . offset ) ;
302
+ var remaining = this . buffer . length - this . offset ;
303
303
if ( remaining >= 5 ) {
304
304
//read message id code
305
305
var id = this . buffer [ this . offset ++ ] ;
306
306
//read message length
307
307
var length = this . parseInt32 ( ) ;
308
308
309
309
if ( remaining > length ) {
310
- var msg = {
311
- length : length
312
- } ;
313
-
314
310
if ( id in this . mapMsgNames ) {
315
- msg . name = this . mapMsgNames [ id ] ;
316
- var fnc = this [ "parse" + String . fromCharCode ( id ) ] ;
317
-
311
+ var msg = {
312
+ length : length ,
313
+ name : this . mapMsgNames [ id ]
314
+ } ;
315
+
316
+ var fnc = this [ "parse" + String . fromCharCode ( id ) ] ;
318
317
return fnc instanceof Function ? fnc ( msg ) : msg ;
319
- } else {
320
- throw new Error ( "Unrecognized message code " + id ) ;
321
318
}
322
- } else {
323
- this . offset -= 5 ;
319
+
320
+ throw new Error ( "Unrecognized message code " + id ) ;
324
321
}
322
+
323
+ this . offset -= 5 ;
325
324
}
326
325
327
326
//cannot read full response
You can’t perform that action at this time.
0 commit comments