Skip to content

Commit

Permalink
fix(server): fix server not closing when spinned (#319)
Browse files Browse the repository at this point in the history
* fix(server): fix server not closing when spinned

* 0.1.23
  • Loading branch information
samuelmasse authored Jan 19, 2022
1 parent ab17e70 commit 0f18c3a
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .yarn/versions/2c52e3b6.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
undecided:
- "@botpress/messaging"
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
## [0.1.23](https://github.com/botpress/messaging/compare/v0.1.22...v0.1.23) (2022-01-19)


### Bug Fixes

* **server:** fix server not closing when spinned ([4bd6a6f](https://github.com/botpress/messaging/commit/4bd6a6fb9ea48a6792b29c0ea05f2485f2f6b4d2))



## [0.1.22](https://github.com/botpress/messaging/compare/v0.1.21...v0.1.22) (2022-01-18)


Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@botpress/messaging",
"version": "0.1.22",
"version": "0.1.23",
"description": "Botpress messaging repo",
"author": "Botpress, Inc.",
"license": "AGPL-3.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@botpress/messaging-server",
"version": "0.1.22",
"version": "0.1.23",
"main": "index.ts",
"license": "AGPL-3.0",
"scripts": {
Expand Down
4 changes: 3 additions & 1 deletion packages/server/src/launcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@ export class Launcher {
}

async shutDown(code?: number) {
if (!this.shuttingDown && !yn(process.env.SPINNED)) {
if (yn(process.env.SPINNED)) {
process.exit(code)
} else if (!this.shuttingDown) {
this.shuttingDown = true

try {
Expand Down

0 comments on commit 0f18c3a

Please sign in to comment.