Skip to content

Commit aebd6ff

Browse files
committed
clear httpServer value when closing server
1 parent 4eb2e18 commit aebd6ff

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

frontend/server/app.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,11 @@ export class UIServer {
7474
* Stops the http server.
7575
*/
7676
close() {
77-
return this.httpServer && this.httpServer.close();
77+
if (!!this.httpServer) {
78+
this.httpServer.close();
79+
}
80+
this.httpServer = undefined;
81+
return this;
7882
}
7983
}
8084

@@ -158,7 +162,7 @@ function createUIServer(options: UIConfigs) {
158162
console.log('Proxied request: ', (proxyReq as any).path);
159163
},
160164
pathRewrite: pathStr =>
161-
pathStr.startsWith(basePath) ? pathStr.substr(basePath.length, pathStr.length) : pathStr,
165+
pathStr.startsWith(basePath) ? pathStr.substr(basePath.length, pathStr.length) : pathStr,
162166
target: apiServerAddress,
163167
}),
164168
);

0 commit comments

Comments
 (0)