We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1da7ffe commit 624a60aCopy full SHA for 624a60a
p2p/src/behaviour.rs
@@ -54,8 +54,10 @@ fn create_request_response_behaviour(
54
protocol_name: StreamProtocol,
55
) -> request_response::cbor::Behaviour<Vec<u8>, Vec<u8>> {
56
use request_response::{Behaviour, Config, ProtocolSupport};
57
+ const REQUEST_RESPONSE_TIMEOUT: u64 = 180;
58
- Behaviour::new([(protocol_name, ProtocolSupport::Full)], Config::default())
59
+ Behaviour::new([(protocol_name, ProtocolSupport::Full)],
60
+ Config::default().with_request_timeout(Duration::from_secs(REQUEST_RESPONSE_TIMEOUT)))
61
}
62
63
/// Configures the connection limits.
0 commit comments