Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -683,6 +683,7 @@ public NodeContext(
// We select a thread size empirically - for debug builds the minimum possible stack size was too small.
// The current size is reported to not have the issue.
_drainPacketQueueThread = new Thread(DrainPacketQueue, 0x30000);
_drainPacketQueueThread.Name = "DrainPacketQueueThread";
_drainPacketQueueThread.IsBackground = true;
_drainPacketQueueThread.Start(this);
}
Expand Down Expand Up @@ -850,10 +851,13 @@ private void DrainPacketQueue(object state)
serverToClientStream.Write(writeStreamBuffer, i, lengthToWrite);
}

if (IsExitPacket(packet))
if (packet is NodeBuildComplete)
{
context._exitPacketState = ExitPacketState.ExitPacketSent;
context._packetQueueDrainDelayCancellation.Cancel();
if (IsExitPacket(packet))
{
context._exitPacketState = ExitPacketState.ExitPacketSent;
context._packetQueueDrainDelayCancellation.Cancel();
}

return;
}
Expand Down