Skip to content

Commit b617a89

Browse files
committed
dont activate multiple times
1 parent 6333f8e commit b617a89

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/capture.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -203,10 +203,9 @@ async fn handle_capture_event(
203203
return release_capture(capture, server).await;
204204
}
205205

206-
if event == CaptureEvent::Begin {
207-
if *state != State::Sending {
208-
*state = State::WaitingForAck;
209-
}
206+
// activated a new client
207+
if event == CaptureEvent::Begin && Some(handle) != server.get_active() {
208+
*state = State::WaitingForAck;
210209
server.set_active(Some(handle));
211210
spawn_hook_command(server, handle);
212211
}

0 commit comments

Comments
 (0)