Skip to content

Commit

Permalink
fix: connections and threads failing to close (#102)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bugs5382 authored Jun 22, 2024
2 parents 5ad7836 + 582f9c0 commit 013d95e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
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

0 comments on commit 013d95e

Please sign in to comment.