-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Labels
bugSomething isn't workingSomething isn't working
Description
When calling emit right before disconnect the emit will not be sent to the server making it unpredictable behaviour.
E.g. following code:
import ipc from "node-ipc";
ipc.config.id = "foo";
ipc.serve(() => {
ipc.config.id = "bar";
ipc.connectTo("foo", () => {
ipc.of["foo"].emit("test", "test");
ipc.disconnect("foo");
})
})
ipc.server.on("test", console.log);
ipc.server.start();will never log. In the debug output it shows
- (server) Starting server as Unix || Windows Socket
- (client) requested connection to foo
- (client) connecting to foo
- (client) dispatch event
- (client) close connection
- (server) socket disconnected
This behaviour is required because I want one of the possible execution paths to send a single message to the server and then close the application (other paths would use the socket as a long time connection)
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working