@@ -239,12 +239,12 @@ await _bridge.WriteAsync(
239239 return true ;
240240 }
241241
242- private async Task SendPayloadToClientAsync ( TypedPayload payload )
242+ private void SendPayloadToClient ( TypedPayload payload )
243243 {
244244 try
245245 {
246- await _socketSpecWriter . WriteAsync ( payload ) ;
247- await _socketSpecWriter . SendAsync ( ) ;
246+ _socketSpecWriter . Write ( payload ) ;
247+ _socketSpecWriter . Send ( ) ;
248248 }
249249 catch ( ObjectDisposedException )
250250 {
@@ -267,7 +267,7 @@ private async Task HandleIncomingMessages()
267267 _messageBuilder . Clear ( ) ;
268268 _messageBuilder . Finish ( FieldInfo . Pack ( _messageBuilder , m . Info ) . Value ) ;
269269
270- await SendPayloadToClientAsync (
270+ SendPayloadToClient (
271271 TypedPayload . FromFlatBufferBuilder ( DataType . FieldInfo , _messageBuilder )
272272 ) ;
273273 break ;
@@ -277,7 +277,7 @@ await SendPayloadToClientAsync(
277277 MatchSettings . Pack ( _messageBuilder , m . Settings ) . Value
278278 ) ;
279279
280- await SendPayloadToClientAsync (
280+ SendPayloadToClient (
281281 TypedPayload . FromFlatBufferBuilder (
282282 DataType . MatchSettings ,
283283 _messageBuilder
@@ -307,7 +307,7 @@ await SendPayloadToClientAsync(
307307 ControllableTeamInfo . Pack ( _messageBuilder , playerMappings ) . Value
308308 ) ;
309309
310- await SendPayloadToClientAsync (
310+ SendPayloadToClient (
311311 TypedPayload . FromFlatBufferBuilder (
312312 DataType . ControllableTeamInfo ,
313313 _messageBuilder
@@ -322,7 +322,7 @@ await SendPayloadToClientAsync(
322322 BallPrediction . Pack ( _messageBuilder , m . BallPrediction ) . Value
323323 ) ;
324324
325- await SendPayloadToClientAsync (
325+ SendPayloadToClient (
326326 TypedPayload . FromFlatBufferBuilder (
327327 DataType . BallPrediction ,
328328 _messageBuilder
@@ -335,7 +335,7 @@ await SendPayloadToClientAsync(
335335 GamePacket . Pack ( _messageBuilder , m . GameState ) . Value
336336 ) ;
337337
338- await SendPayloadToClientAsync (
338+ SendPayloadToClient (
339339 TypedPayload . FromFlatBufferBuilder (
340340 DataType . GamePacket ,
341341 _messageBuilder
@@ -359,7 +359,7 @@ await SendPayloadToClientAsync(
359359 _messageBuilder . Clear ( ) ;
360360 _messageBuilder . Finish ( MatchComm . Pack ( _messageBuilder , m . Message ) . Value ) ;
361361
362- await SendPayloadToClientAsync (
362+ SendPayloadToClient (
363363 TypedPayload . FromFlatBufferBuilder (
364364 DataType . MatchComms ,
365365 _messageBuilder
@@ -436,7 +436,7 @@ public void Cleanup()
436436 Type = DataType . None ,
437437 Payload = new ArraySegment < byte > ( [ 1 ] ) ,
438438 } ;
439- SendPayloadToClientAsync ( msg ) . Wait ( ) ;
439+ SendPayloadToClient ( msg ) ;
440440 }
441441 catch ( Exception ) { }
442442 finally
0 commit comments