File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -541,14 +541,18 @@ ${Const.CONNECTION_DEVICE}.print("\\xFF");
541
541
Puck lib we just copy in the default handler here. */
542
542
if ( callback === undefined ) {
543
543
connection . on ( "data" , function ( d ) { // the default handler
544
- connection . received += d ;
545
- connection . hadData = true ;
544
+ if ( ! Puck . RECEIVED_NOT_IN_DATA_HANDLER ) {
545
+ connection . received += d ;
546
+ connection . hadData = true ;
547
+ }
546
548
if ( connection . cb ) connection . cb ( d ) ;
547
549
} ) ;
548
550
} else {
549
551
connection . on ( "data" , function ( d ) {
550
- connection . received += d ;
551
- connection . hadData = true ;
552
+ if ( ! Puck . RECEIVED_NOT_IN_DATA_HANDLER ) {
553
+ connection . received += d ;
554
+ connection . hadData = true ;
555
+ }
552
556
if ( connection . cb ) connection . cb ( d ) ;
553
557
callback ( d ) ;
554
558
} ) ;
You can’t perform that action at this time.
0 commit comments