Skip to content

Commit

Permalink
Do not reconnect to cloud variables on code 4003
Browse files Browse the repository at this point in the history
  • Loading branch information
GarboMuffin committed Nov 3, 2024
1 parent 857dc10 commit d098664
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/lib/cloud-provider.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,18 @@ class CloudProvider {
}

onClose (e) {
// tw: code 4002 is "Username Error" -- do not try to reconnect
// Code 4002 is "Username Error" -- do not try to reconnect
if (e && e.code === 4002) {
log.info('Cloud username is invalid. Not reconnecting.');
this.onInvalidUsername();
return;
}
// tw: code 4004 is "Project Unavailable" -- do not try to reconnect
// Code 4003 is "Overloaded" -- do not try to reconnect
if (e && e.code === 4003) {
log.info('The server is full. Not reconnecting.');
return;
}
// Code 4004 is "Project Unavailable" -- do not try to reconnect
if (e && e.code === 4004) {
log.info('Cloud variables are disabled for this project. Not reconnecting.');
return;
Expand Down

0 comments on commit d098664

Please sign in to comment.