Skip to content

Commit

Permalink
asynch correction
Browse files Browse the repository at this point in the history
  • Loading branch information
Psychopoulet committed Nov 22, 2017
1 parent 57fc484 commit 340c7f3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
11 changes: 9 additions & 2 deletions lib/main.js
Expand Up @@ -63,8 +63,15 @@ module.exports = class MultiSocketServers extends require("node-multi-webserver"

_tmpOnConnection.forEach((tmpOnConnection) => {

Promise.resolve().then(() => {
tmpOnConnection(socket, server);
(0, process).nextTick(() => {

try {
tmpOnConnection(socket, server);
}
catch (e) {
// nothing to do here
}

});

});
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "node-multi-socketservers",
"version": "0.2.9",
"version": "0.2.10",
"description": "A multi http & socket servers manager, based on node-multi-webserver",
"main": "lib/main.js",
"scripts": {
Expand Down

0 comments on commit 340c7f3

Please sign in to comment.