mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-08-09 06:52:53 -04:00
Instruct Ping
to keep the connection alive
This commit is contained in:
parent
1af0623c85
commit
6c446825b7
3 changed files with 11 additions and 4 deletions
|
@ -5,7 +5,7 @@ use crate::protocol::bob::State2;
|
|||
use crate::{bitcoin, env};
|
||||
use anyhow::{anyhow, Error, Result};
|
||||
use libp2p::core::Multiaddr;
|
||||
use libp2p::ping::{Ping, PingEvent};
|
||||
use libp2p::ping::{Ping, PingConfig, PingEvent};
|
||||
use libp2p::request_response::{RequestId, ResponseChannel};
|
||||
use libp2p::{NetworkBehaviour, PeerId};
|
||||
use std::sync::Arc;
|
||||
|
@ -83,7 +83,7 @@ impl Behaviour {
|
|||
transfer_proof: transfer_proof::bob(),
|
||||
encrypted_signature: encrypted_signature::bob(),
|
||||
redial: redial::Behaviour::new(alice, Duration::from_secs(2)),
|
||||
ping: Ping::default(),
|
||||
ping: Ping::new(PingConfig::new().with_keep_alive(true)),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue