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 error_status: Status; // Gets initialized inside loop
 | ||||||
|             let mut timeout = interval(state.get_timeout()); |             let mut timeout = interval(state.get_timeout()); | ||||||
|  |             timeout.tick().await; | ||||||
|             loop { |             loop { | ||||||
|                 tokio::select! { |                 tokio::select! { | ||||||
|                     Some(msg) = inbound.next() => { |                     Some(msg) = inbound.next() => { | ||||||
|                         timeout = interval(state.get_timeout()); |                         timeout.reset(); | ||||||
|                         match msg { |                         match msg { | ||||||
|                             Ok(update) => { |                             Ok(update) => { | ||||||
|                                 if update.ip == remote_ip { |                                 if update.ip == remote_ip { | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user