Skip to content

Commit

Permalink
* (bluefox) Corrected the connection indication
Browse files Browse the repository at this point in the history
  • Loading branch information
GermanBluefox committed Feb 13, 2022
1 parent a0d6be3 commit 5674c3a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ You can set option *Force Web-Sockets* to force using only web-sockets transport
-->

## Changelog
### 4.1.1 (2022-02-13)
### __WORK IN PROGRESS__
* (bluefox) Corrected the connection indication

### 4.1.0 (2022-01-31)
Expand Down
6 changes: 3 additions & 3 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ function startAdapter(options) {

adapter.on('unload', callback => {
try {
adapter.setState && adapter.setState('indicator.connected', '', true);
adapter.setState && adapter.setState('indicator.connection', false, true);
adapter.setState && adapter.setState('info.connected', '', true);
adapter.setState && adapter.setState('info.connection', false, true);
adapter.log.info(`terminating http${webServer.settings.secure ? 's' : ''} server on port ${webServer.settings.port}`);
webServer.io.close();
webServer.server.close();
Expand Down Expand Up @@ -169,7 +169,7 @@ function initWebServer(settings) {

// Start the web server
server.server.listen(settings.port, (!settings.bind || settings.bind === '0.0.0.0') ? undefined : settings.bind || undefined, () => {
adapter.setState('indicator.connection', true, true);
adapter.setState('info.connection', true, true);
serverListening = true
});

Expand Down

0 comments on commit 5674c3a

Please sign in to comment.