Skip to content

Commit

Permalink
chore: never throw if we don't have a valid client name
Browse files Browse the repository at this point in the history
  • Loading branch information
qdot committed Sep 1, 2024
1 parent 6bb0367 commit 55db526
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/remote_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ async fn run_server<ConnectorType>(
// Only send event if we just connected. Sucks to check it on every message but the boolean check should be quick.
if !connected && server_clone.connected() {
if remote_event_sender_clone.receiver_count() > 0 {
if remote_event_sender_clone.send(ButtplugRemoteServerEvent::ClientConnected(server_clone.client_name().unwrap().clone())).is_err() {
if remote_event_sender_clone.send(ButtplugRemoteServerEvent::ClientConnected(server_clone.client_name().unwrap_or("Buttplug Client (No name specified)".to_owned()).clone())).is_err() {
error!("Cannot send event to owner, dropping and assuming local server thread has exited.");
}
}
Expand Down

0 comments on commit 55db526

Please sign in to comment.