File tree Expand file tree Collapse file tree
osu.Game.Rulesets.Sentakki.Tests/IO Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -148,20 +148,20 @@ private async void clientLoop()
148148 {
149149 TransmissionData packet = new TransmissionData ( buffer [ 0 ] ) ;
150150
151- // Server has shut down
152- if ( packet == TransmissionData . Kill )
153- {
154- // On non-Windows platforms, the client doesn't automatically reconnect
155- // So we must recreate the client to ensure safety;
156- pipeClient . Dispose ( ) ;
157- pipeClient = new NamedPipeClientStream ( "." , "senPipe" ,
158- PipeDirection . In , PipeOptions . Asynchronous ,
159- TokenImpersonationLevel . Impersonation ) ;
160- }
161-
162151 if ( packet != TransmissionData . Empty )
163152 text . Text = packet . ToString ( ) ;
164153 }
154+ else if ( result == 0 ) // End of stream reached, meaning that the server disconnected
155+ {
156+ text . Text = TransmissionData . Kill . ToString ( ) ;
157+
158+ // On non-Windows platforms, the client doesn't automatically reconnect
159+ // So we must recreate the client to ensure safety;
160+ pipeClient . Dispose ( ) ;
161+ pipeClient = new NamedPipeClientStream ( "." , "senPipe" ,
162+ PipeDirection . In , PipeOptions . Asynchronous ,
163+ TokenImpersonationLevel . Impersonation ) ;
164+ }
165165 }
166166 catch
167167 {
You can’t perform that action at this time.
0 commit comments