Skip to content

Commit

Permalink
Pass error along with error event
Browse files Browse the repository at this point in the history
  • Loading branch information
parnic committed Jan 9, 2025
1 parent 2ffed22 commit 7976348
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 9 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,17 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [v0.2.2] - 2025-01-08

### Changed

- Unit errors now pass the error along.

## [v0.2.1] - 2025-01-08

### Fixed

- Fixed timeouts and socket errors not emitting the "close" event like the documentation says they do.
- Fixed unit timeouts and socket errors not emitting the "close" event like the documentation says they do.

## [v0.2.0] - 2025-01-05

Expand Down
2 changes: 1 addition & 1 deletion cjs/unit.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cjs/unit.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion esm/unit.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion esm/unit.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions 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 package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "node-intellicenter",
"version": "0.2.1",
"version": "0.2.2",
"description": "NodeJS library for communicating with a Pentair IntelliCenter controller",
"keywords": [
"pentair",
Expand Down
2 changes: 1 addition & 1 deletion src/unit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export class Unit extends EventEmitter {
this.client.on("error", (evt) => {
// todo: emit event so we can reconnect? auto reconnect?
debugUnit("error in websocket: $o", evt);
this.emit("error");
this.emit("error", evt);
socketCleanup();
});
this.client.on("open", () => {
Expand Down

0 comments on commit 7976348

Please sign in to comment.