Skip to content

Commit

Permalink
* (bluefox) Trying to reconnect after the EHOSTUNREACH error code
Browse files Browse the repository at this point in the history
  • Loading branch information
GermanBluefox committed Sep 9, 2024
1 parent 1826f52 commit ccd6363
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ For example, `red = 0`, blue and green will stay unchanged.
Placeholder for the next version (at the beginning of the line):
### **WORK IN PROGRESS**
-->
### **WORK IN PROGRESS**
* (bluefox) Trying to reconnect after the EHOSTUNREACH error code

### 2.0.1 (2024-09-06)
* (bluefox) Corrected error with array comparison
* (bluefox) Added tests
Expand Down
1 change: 1 addition & 0 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,7 @@ class WifiLight {
switch (error.code) {
case 'ECONNRESET':
case 'ETIMEDOUT':
case 'EHOSTUNREACH':
case 'EPIPE':
adapter.log.warn(`[${this.config.ip}] onError: ${error.code} ${error.message} - reconnecting in 5 sec...`);
this.reconnect(5000);
Expand Down

0 comments on commit ccd6363

Please sign in to comment.