File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ let activeTunnel
1212let started = false
1313
1414const MIN_JAVA_VERSION = 11
15+ const DEFAULT_TIMEOUT = 90
1516
1617function parseJavaVersion ( versionOutput ) {
1718 const versionMatch = versionOutput . match ( / v e r s i o n " ( \d + ) / )
@@ -222,6 +223,7 @@ async function startTunnelAsync (options = {}) {
222223 return new Promise ( ( resolve , reject ) => {
223224 let waitCounter = 0
224225 let settled = false
226+ const timeout = options . timeout || DEFAULT_TIMEOUT
225227
226228 const onReady = ( ) => {
227229 if ( settled ) return
@@ -245,7 +247,7 @@ async function startTunnelAsync (options = {}) {
245247 onReady ( )
246248 } catch {
247249 waitCounter += 1
248- if ( waitCounter > 90 ) {
250+ if ( waitCounter > timeout ) {
249251 const errorMessage = `Tunnel failed to launch in ${ waitCounter } seconds.`
250252 console . log ( errorMessage )
251253 onError ( new Error ( errorMessage ) )
You can’t perform that action at this time.
0 commit comments