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");
541541 Puck lib we just copy in the default handler here. */
542542 if ( callback === undefined ) {
543543 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+ }
546548 if ( connection . cb ) connection . cb ( d ) ;
547549 } ) ;
548550 } else {
549551 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+ }
552556 if ( connection . cb ) connection . cb ( d ) ;
553557 callback ( d ) ;
554558 } ) ;
You can’t perform that action at this time.
0 commit comments