Skip to content

Commit

Permalink
close connection after unload
Browse files Browse the repository at this point in the history
  • Loading branch information
misanorot committed Oct 31, 2023
1 parent 351d083 commit 269ac9f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG_OLD.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Older changes

### 1.4.3 (2023-03-21)
* (misanorot) fixed reload xml issues

### 1.4.2 (2022-12-26)
* (misanorot) update files
* (misanorot) translate states

#### 1.3.6 (12.04.2022)
* (misanorot) fixed ssh errors
#### 1.3.5 (08.02.2022)
* (misanorot) fixed ack issues

Expand Down
14 changes: 4 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,22 +81,16 @@ mit dem gewünschten *get* Wert beschrieben werden.
Placeholder for the next version (at the beginning of the line):
### **WORK IN PROGRESS**
-->
### **WORK IN PROGRESS**
* (misanorot) fixed open connection after unload

### 1.4.5 (2023-08-13)
* (misanorot) fixed issue #135

### 1.4.4 (2023-06-21)
* (misanorot) Fixed JS-Controller 5 issues

### 1.4.3 (2023-03-21)
* (misanorot) fixed reload xml issues

### 1.4.2 (2022-12-26)
* (misanorot) update files
* (misanorot) translate states


#### 1.3.6 (12.04.2022)
* (misanorot) fixed ssh errors
**[older changelogs](CHANGELOG_OLD.md)**

### License

Expand Down
3 changes: 3 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ class Viessmann extends utils.Adapter {
*/
onUnload(callback) {
try {
this.setState('info.connection', false, true);
client.end();
client.destroy(); // kill client after server's response
// Here you must clear all timeouts or intervals that may still be active
clearTimeout(timerWait);
clearTimeout(timerErr);
Expand Down

0 comments on commit 269ac9f

Please sign in to comment.