Clean exit, remove forcefully_free

This commit is contained in:
Alex Hultman 2019-03-02 04:38:01 +01:00
parent 319eea90bd
commit a43675c197
7 changed files with 33 additions and 38 deletions

View file

@ -71,10 +71,3 @@ listenWithSettings({
ssl: false,
compression: uWS.DEDICATED_COMPRESSOR
});
/* This is required to check for memory leaks */
process.on('exit', () => {
apps.forEach((a) => {
a.app.forcefully_free();
});
});

View file

@ -201,9 +201,3 @@ const app = uWS./*SSL*/App({
listenSocket = token;
}
});
/* Yes we do this crazy thing here */
process.on('beforeExit', () => {
uWS.print('Exiting now');
app.forcefully_free();
});