mirror of
https://github.com/IntQuant/noita_entangled_worlds.git
synced 2025-10-19 07:03:16 +00:00
Consistency - host also gets PeerConnected event for itself
This commit is contained in:
parent
21a7fdf08a
commit
ff74e503a1
1 changed files with 6 additions and 1 deletions
|
@ -117,6 +117,11 @@ impl Peer {
|
|||
});
|
||||
if host_addr.is_none() {
|
||||
shared.remote_peers.insert(PeerId(0), RemotePeer::default());
|
||||
shared
|
||||
.inbound_channel
|
||||
.0
|
||||
.send(NetworkEvent::PeerConnected(PeerId(0)))
|
||||
.unwrap();
|
||||
}
|
||||
reactor::Reactor::start(Arc::clone(&shared));
|
||||
Ok(Peer { shared })
|
||||
|
@ -296,7 +301,7 @@ mod test {
|
|||
connection_timeout: Duration::from_millis(1000),
|
||||
..Default::default()
|
||||
});
|
||||
let addr = "127.0.0.1:56002".parse().unwrap();
|
||||
let addr = "127.0.0.1:56003".parse().unwrap();
|
||||
let host = Peer::host(addr, settings.clone()).unwrap();
|
||||
thread::sleep(Duration::from_millis(10));
|
||||
assert_eq!(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue