File tree Expand file tree Collapse file tree 1 file changed +1
-6
lines changed
Expand file tree Collapse file tree 1 file changed +1
-6
lines changed Original file line number Diff line number Diff line change @@ -147,8 +147,6 @@ function shouldConnect(peripheral) {
147147 return false ;
148148}
149149
150- let loggedStop = false ;
151-
152150noble . on ( 'discover' , peripheral => {
153151 if ( shouldConnect ( peripheral ) ) {
154152 let address = peripheral . address !== undefined ? peripheral . address . replace ( / : / g, '' ) : undefined ;
@@ -176,10 +174,7 @@ noble.on('discover', peripheral => {
176174 log ( 'discovered %s' , id ) ;
177175 if ( argv . expectedDevices &&
178176 Object . keys ( devices ) . length === argv . expectedDevices ) {
179- if ( ! loggedStop ) {
180- log ( 'all expected devices connected, stopping scan' ) ;
181- loggedStop = true ;
182- }
177+ log ( 'all expected devices connected, stopping scan' ) ;
183178 noble . stopScanning ( ) ;
184179 Object . values ( devices ) . forEach ( ( device ) => { device . connect ( ) ; } ) ;
185180 }
You can’t perform that action at this time.
0 commit comments