Skip to content

Commit

Permalink
Fixing closing order of communicator
Browse files Browse the repository at this point in the history
  • Loading branch information
trikko committed Apr 29, 2024
1 parent 58000d0 commit 2da125d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions source/serverino/daemon.d
Original file line number Diff line number Diff line change
Expand Up @@ -204,15 +204,13 @@ package class WorkerInfo
if (bytes == Socket.ERROR)
{
debug warning("Worker #" ~ pi.id.to!string ~ " exited/terminated/killed (socket error).");
setStatus(WorkerInfo.State.STOPPED);
communicator.reset();
setStatus(WorkerInfo.State.STOPPED);
}
else if (bytes == 0)
{
// User closed socket.
if (communicator.clientSkt !is null && communicator.clientSkt.isAlive)
communicator.clientSkt.shutdown(SocketShutdown.BOTH);

communicator.reset();
setStatus(WorkerInfo.State.STOPPED);
}
else
Expand Down

0 comments on commit 2da125d

Please sign in to comment.