@@ -21,7 +21,7 @@ public ClientReportResponse ProcessClientReport(ClientReportRequest request)
2121 EnsurePeriodicUpdateEnabled ( ) ;
2222 using var scope = _clientsLock . EnterScope ( ) ;
2323
24- logger . LogTrace ( "Received client report with ID: {0 }" , request . ClientId ) ;
24+ logger . LogTrace ( "Received client report with ID: {clientId }" , request . ClientId ) ;
2525
2626 if ( _clients . TryGetValue ( request . ClientId , out var clientInfo ) )
2727 {
@@ -31,13 +31,13 @@ public ClientReportResponse ProcessClientReport(ClientReportRequest request)
3131 clientInfo . MemoryAllocated = request . MemoryAllocated ;
3232 clientInfo . State = ClientState . Active ;
3333
34- logger . LogTrace ( "Updating client with ID: {0 }" , clientInfo . Id ) ;
34+ logger . LogTrace ( "Updating client with ID: {clientId }" , clientInfo . Id ) ;
3535 ClientUpdated ? . Invoke ( this , clientInfo ) ;
3636 }
3737 else
3838 {
3939 // Create new client, fire event and return response from the created client
40- clientInfo = new ClientInfo ( )
40+ clientInfo = new ClientInfo
4141 {
4242 Id = request . ClientId ,
4343 HostName = request . ClientHostName ,
@@ -50,11 +50,11 @@ public ClientReportResponse ProcessClientReport(ClientReportRequest request)
5050 } ;
5151 _clients [ clientInfo . Id ] = clientInfo ;
5252
53- logger . LogInformation ( "Added new client with ID: {0 }" , clientInfo . Id ) ;
53+ logger . LogInformation ( "Added new client with ID: {clientId }" , clientInfo . Id ) ;
5454 ClientAdded ? . Invoke ( this , clientInfo ) ;
5555 }
5656
57- return new ClientReportResponse ( )
57+ return new ClientReportResponse
5858 {
5959 DesiredPercentage = clientInfo . DesiredPercentage ,
6060 DesiredMemoryAllocated = clientInfo . DesiredMemoryAllocated ,
@@ -94,7 +94,7 @@ private async Task CheckForClientsTimeout()
9494 . Where ( client => client . State == ClientState . Timeout || DateTime . Now - client . LastUpdated > _keepAliveInterval )
9595 . ToArray ( ) ;
9696
97- if ( timeOutedClients . Any ( ) )
97+ if ( timeOutedClients . Length != 0 )
9898 {
9999 using var scope = _clientsLock . EnterScope ( ) ;
100100
@@ -103,13 +103,13 @@ private async Task CheckForClientsTimeout()
103103 if ( client . State == ClientState . Timeout )
104104 {
105105 _clients . Remove ( client . Id ) ;
106- logger . LogInformation ( "Removed client with ID: {0 }" , client . Id ) ;
106+ logger . LogInformation ( "Removed client with ID: {clientId }" , client . Id ) ;
107107 ClientRemoved ? . Invoke ( this , client ) ;
108108 }
109109 else
110110 {
111111 client . State = ClientState . Timeout ;
112- logger . LogInformation ( "First timeout for client with ID: {0 }" , client . Id ) ;
112+ logger . LogInformation ( "First timeout for client with ID: {clientId }" , client . Id ) ;
113113 ClientUpdated ? . Invoke ( this , client ) ;
114114 }
115115 }
0 commit comments