Skip to content

Commit

Permalink
cloud: fix tunnel registration failure hang
Browse files Browse the repository at this point in the history
  • Loading branch information
koush committed Jul 6, 2024
1 parent 9dc5f2a commit 6851681
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions plugins/cloud/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion plugins/cloud/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,5 @@
"@types/nat-upnp": "^1.1.5",
"@types/node": "^20.14.6"
},
"version": "0.2.20"
"version": "0.2.21"
}
4 changes: 4 additions & 0 deletions plugins/cloud/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1019,6 +1019,10 @@ class ScryptedCloud extends ScryptedDeviceBase implements OauthClient, Settings,

const lines = string.split('\n');
for (const line of lines) {
if (line.includes('Register tunnel error') && deferred.finished ) {
this.console.warn('Cloudflare registration failed after tunnel started. The old tunnel may be invalid. Terminating.');
cloudflareTunnel.child.kill();
}
if (line.includes('hostname'))
this.console.log(line);
const match = /config=(".*?}")/gm.exec(line)
Expand Down

0 comments on commit 6851681

Please sign in to comment.