Skip to content

Commit 1cf804c

Browse files
Copilotnixel2007
andcommitted
Revert changes to DefaultMessageServer per code review
Per feedback from @Bayselonarrend, reverted the changes to DefaultMessageServer that kept the server thread running indefinitely on connection loss. The current implementation still supports reconnection through DelayedConnectionChannel's thread-safe reconnection logic and DefaultDebugService not throwing StopServiceException on disconnect without terminate. Co-authored-by: nixel2007 <1132840+nixel2007@users.noreply.github.com>
1 parent 0e44c9b commit 1cf804c

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

src/OneScript.DebugProtocol/TcpServer/DefaultMessageServer.cs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ This Source Code Form is subject to the terms of the
66
----------------------------------------------------------*/
77

88
using System;
9-
using System.IO;
109
using System.Threading;
1110
using OneScript.DebugProtocol.Abstractions;
1211

@@ -84,15 +83,7 @@ private void RunCommandsLoop()
8483
}
8584
catch (ObjectDisposedException)
8685
{
87-
// Connection closed, but don't stop server - allow reconnection
88-
// The DelayedConnectionChannel will wait for a new connection
89-
continue;
90-
}
91-
catch (IOException)
92-
{
93-
// Connection lost, but don't stop server - allow reconnection
94-
// The DelayedConnectionChannel will wait for a new connection
95-
continue;
86+
_serverStopped = true;
9687
}
9788
catch (ThreadInterruptedException)
9889
{

0 commit comments

Comments
 (0)