File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/qos_core/src/protocol Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ use crate::{
1616const MEGABYTE : usize = 1024 * 1024 ;
1717const MAX_ENCODED_MSG_LEN : usize = 128 * MEGABYTE ;
1818
19- /// Initial client timeout for the processor until the Manifest says otherwise
19+ /// Initial client timeout for the processor until the Manifest says otherwise, see reaper.rs
2020pub const INITIAL_CLIENT_TIMEOUT : Duration = Duration :: from_secs ( 5 ) ;
2121
2222/// Helper type to keep `ProtocolState` shared using `Arc<Mutex<ProtocolState>>`
@@ -52,8 +52,9 @@ impl ProtocolProcessor {
5252 self . state . read ( ) . await . get_phase ( )
5353 }
5454
55- /// Sets the client timeout value for the `app_client`
55+ /// Sets the client timeout value for the `app_client`, maximum allowed value is `u16::MAX` milliseconds
5656 pub fn set_client_timeout ( & mut self , timeout : Duration ) {
57+ assert ! ( timeout. as_millis( ) < u16 :: MAX . into( ) , "client timeout > 65s" ) ;
5758 self . app_client . set_timeout ( timeout) ;
5859 }
5960
You can’t perform that action at this time.
0 commit comments