File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change 88
99if ( args . Length > 0 && args [ 0 ] == "--version" )
1010{
11- Console . WriteLine ( "RLBotServer v5.beta.6.9 " ) ;
11+ Console . WriteLine ( "RLBotServer v5.beta.6.10 " ) ;
1212 Environment . Exit ( 0 ) ;
1313}
1414
Original file line number Diff line number Diff line change @@ -23,10 +23,20 @@ MatchStarter matchStarter
2323
2424 private async Task HandleInternalMessages ( )
2525 {
26+ bool isFirstTick = true ;
27+
2628 await foreach ( IBridgeMessage message in _context . Reader . ReadAllAsync ( ) )
2729 {
2830 lock ( _context )
2931 {
32+ if ( isFirstTick )
33+ {
34+ // Don't start reading messages until we receive the first message from Rocket League
35+ isFirstTick = false ;
36+ Monitor . Wait ( _context ) ;
37+ _context . Logger . LogDebug ( "Started reading internal messages" ) ;
38+ }
39+
3040 try
3141 {
3242 message . HandleMessage ( _context ) ;
@@ -47,6 +57,8 @@ private async Task HandleServer()
4757
4858 _context . Logger . LogInformation ( "Connected to Rocket League" ) ;
4959
60+ bool isFirstTick = true ;
61+
5062 await foreach ( var messageClump in _context . Messenger . ReadAllAsync ( ) )
5163 {
5264 lock ( _context )
@@ -147,6 +159,13 @@ private async Task HandleServer()
147159 }
148160
149161 _context . RenderingMgmt . SendRenderClears ( ) ;
162+
163+ if ( isFirstTick )
164+ {
165+ isFirstTick = false ;
166+ // Trigger HandleInternalMessages to start processing messages
167+ Monitor . Pulse ( _context ) ;
168+ }
150169 }
151170 }
152171 }
You can’t perform that action at this time.
0 commit comments