diff options
| -rw-r--r-- | app/app.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/app.js b/app/app.js index 6dc4acce58..f22b66029b 100644 --- a/app/app.js +++ b/app/app.js @@ -419,6 +419,17 @@ export default class AppRenderer { } catch (error) { log.error(`Cannot fetch initial state: ${error.message}`); } + + // auto connect the tunnel on startup + // note: disabled when developing + if (process.env.NODE_ENV !== 'development') { + try { + log.debug('Auto-connecting the tunnel...'); + await this.connectTunnel(); + } catch (error) { + log.error(`Failed to auto-connect the tunnel: ${error.message}`); + } + } } async _onCloseConnection(error: ?Error) { |
