File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import { CustomError } from '@httptoolkit/util';
22import { Client as AdbClient , DeviceClient } from '@devicefarmer/adbkit' ;
33import * as FridaJs from 'frida-js' ;
44
5- import { waitUntil } from '../../util/promise' ;
5+ import { waitUntil , withTimeout } from '../../util/promise' ;
66import { HtkConfig } from '../../config' ;
77import {
88 EMULATOR_HOST_IPS ,
@@ -38,7 +38,8 @@ const isFridaInstalled = (deviceClient: DeviceClient) =>
3838 . catch ( ( ) => false ) ;
3939
4040const isDevicePortOpen = ( deviceClient : DeviceClient , port : number ) =>
41- deviceClient . openTcp ( port ) . then ( ( conn ) => {
41+ withTimeout ( 1000 , deviceClient . openTcp ( port ) )
42+ . then ( ( conn ) => {
4243 // If the connection opened at all, then something is listening...
4344 conn . on ( 'error' , ( ) => { } ) ;
4445 conn . end ( ) ;
You can’t perform that action at this time.
0 commit comments