This repository was archived by the owner on Dec 27, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " @sakuraapi/core" ,
3- "version" : " 0.21.0 " ,
3+ "version" : " 0.21.1 " ,
44 "description" : " MongoDB and TypeScript MEAN Stack Framework for NodeJS" ,
55 "main" : " lib/index.js" ,
66 "typings" : " lib/index.d.ts" ,
Original file line number Diff line number Diff line change @@ -256,7 +256,7 @@ export class SakuraApi {
256256 // emitters
257257 private closed$ = new Subject < void > ( ) ;
258258 private listening$ = new Subject < void > ( ) ;
259-
259+
260260 /**
261261 * Returns the address of the server as a string.
262262 */
@@ -337,7 +337,7 @@ export class SakuraApi {
337337
338338 this . config = ( ! options . config )
339339 ? new SakuraApiConfig ( ) . load ( options . configPath ) || { }
340- : options . configPath ;
340+ : options . config ;
341341
342342 this . _dbConnections = ( options . dbConfig )
343343 ? this . _dbConnections = options . dbConfig
@@ -418,7 +418,8 @@ export class SakuraApi {
418418
419419 return new Promise < void > ( ( resolve , reject ) => {
420420 this . server . close ( ( err ) => {
421- if ( err && err . message !== 'Not running' ) {
421+ const notRunningErr = err && ( ( ! err . code && err . message === 'Not running' ) || err . code === 'ERR_SERVER_NOT_RUNNING' ) ;
422+ if ( err && ! notRunningErr ) {
422423 debug . normal ( `.close error` , err ) ;
423424 this . closed$ . next ( ) ;
424425 reject ( err ) ;
You can’t perform that action at this time.
0 commit comments