Skip to content

Commit

Permalink
fix update pos
Browse files Browse the repository at this point in the history
  • Loading branch information
feschber committed Nov 6, 2024
1 parent ad9cfda commit dfe73a6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ impl Service {
event = emulation.event() => match event {
EmulationEvent::Connected { addr, pos, fingerprint } => {
// check if already registered
if self.incoming_conns.borrow_mut().insert(addr) {
if !self.incoming_conns.borrow_mut().contains(&addr) {
self.add_incoming(addr, pos, fingerprint.clone(), &capture);
self.notify_frontend(FrontendEvent::IncomingConnected(fingerprint, addr, pos));
} else {
Expand Down Expand Up @@ -343,6 +343,7 @@ impl Service {
let handle = Self::ENTER_HANDLE_BEGIN + self.next_trigger_handle;
self.next_trigger_handle += 1;
capture.create(handle, pos);
self.incoming_conns.borrow_mut().insert(addr);
self.incoming_conn_info.borrow_mut().insert(
handle,
Incoming {
Expand Down

0 comments on commit dfe73a6

Please sign in to comment.