Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: connections and threads failing to close #102

Merged
merged 2 commits into from
Jun 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,24 +75,24 @@
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@the-rabbit-hole/semantic-release-config": "^1.5.0",
"@types/node": "^20.14.1",
"@types/node": "^20.14.8",
"@types/tcp-port-used": "^1.0.4",
"@typescript-eslint/parser": "^7.12.0",
"@typescript-eslint/parser": "^7.13.1",
"@vitest/coverage-v8": "^1.6.0",
"@vitest/ui": "^1.6.0",
"node-hl7-server": "^2.3.0",
"npm-check-updates": "^16.14.20",
"npm-package-json-lint": "^7.1.0",
"npm-package-json-lint": "^8.0.0",
"portfinder": "^1.0.32",
"pre-commit": "^1.2.2",
"semantic-release": "^24.0.0",
"snazzy": "^9.0.0",
"tcp-port-used": "^1.0.2",
"ts-node": "^10.9.2",
"ts-standard": "^12.0.2",
"tsd": "^0.31.0",
"typedoc": "^0.25.13",
"typescript": "5.4.5",
"tsd": "^0.31.1",
"typedoc": "^0.26.0",
"typescript": "5.5.2",
"vitest": "^1.6.0"
},
"precommit": [
Expand Down
4 changes: 3 additions & 1 deletion src/client/connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export class Connection extends EventEmitter implements Connection {

/** Close Client Listener Instance.
* @description Force close a connection.
* It Will stop any re-connection timers.
* It will stop any re-connection timers.
* If you want to restart, your app has to restart the connection.
* @since 1.0.0
* @example
Expand Down Expand Up @@ -149,6 +149,8 @@ export class Connection extends EventEmitter implements Connection {

this.emit('close')

clearTimeout(this._connectionTimer)

this._readyState = ReadyState.CLOSED
}

Expand Down
Loading