diff options
author | Max Romanov <max.romanov@nginx.com> | 2019-04-01 16:40:40 +0300 |
---|---|---|
committer | Max Romanov <max.romanov@nginx.com> | 2019-04-01 16:40:40 +0300 |
commit | 8557cb366092ea1bbc88386bdd79b9dad5867f19 (patch) | |
tree | 364b69ed01c22eee2fec69bcb06ab3a57ceef264 /src/nodejs/unit-http/http_server.js | |
parent | aca42de18ad9877db7e4a7f598a4c5cb55644fe8 (diff) | |
download | unit-8557cb366092ea1bbc88386bdd79b9dad5867f19.tar.gz unit-8557cb366092ea1bbc88386bdd79b9dad5867f19.tar.bz2 |
Introducing close event to notify about server stop.
This closes #236 on GitHub.
Thanks to 0xcdcdcdcd.
Diffstat (limited to '')
-rwxr-xr-x | src/nodejs/unit-http/http_server.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nodejs/unit-http/http_server.js b/src/nodejs/unit-http/http_server.js index 057a1f26..0ac5d649 100755 --- a/src/nodejs/unit-http/http_server.js +++ b/src/nodejs/unit-http/http_server.js @@ -387,6 +387,10 @@ Server.prototype.emit_events = function (server, req, res) { }); }; +Server.prototype.emit_close = function () { + this.emit('close'); +}; + function connectionListener(socket) { } |