fix grpc client error
reset timeout on inbound message insted of creating new timer which was triggering timeout
This commit is contained in:
		
							parent
							
								
									4a6e8c4c73
								
							
						
					
					
						commit
						8226f03e7c
					
				| @ -163,10 +163,11 @@ impl Update for NodeServer { | ||||
| 
 | ||||
|             let error_status: Status; // Gets initialized inside loop
 | ||||
|             let mut timeout = interval(state.get_timeout()); | ||||
|             timeout.tick().await; | ||||
|             loop { | ||||
|                 tokio::select! { | ||||
|                     Some(msg) = inbound.next() => { | ||||
|                         timeout = interval(state.get_timeout()); | ||||
|                         timeout.reset(); | ||||
|                         match msg { | ||||
|                             Ok(update) => { | ||||
|                                 if update.ip == remote_ip { | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user