Skip to content

Commit

Permalink
cloud: fix cloudflare unregister
Browse files Browse the repository at this point in the history
  • Loading branch information
koush committed Aug 9, 2024
1 parent 12c734f commit 8daf74e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 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 @@ -54,5 +54,5 @@
"@types/node": "^22.1.0",
"ts-node": "^10.9.2"
},
"version": "0.2.30"
"version": "0.2.31"
}
3 changes: 2 additions & 1 deletion plugins/cloud/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1036,7 +1036,8 @@ class ScryptedCloud extends ScryptedDeviceBase implements OauthClient, Settings,

const lines = string.split('\n');
for (const line of lines) {
if (line.includes('Unregistered tunnel connection') && deferred.finished) {
if ((line.includes('Unregistered tunnel connection') || 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();
}
Expand Down

0 comments on commit 8daf74e

Please sign in to comment.