diff options
| -rw-r--r-- | mumd/src/main.rs | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/mumd/src/main.rs b/mumd/src/main.rs index c0caa77..db6d2ef 100644 --- a/mumd/src/main.rs +++ b/mumd/src/main.rs @@ -31,11 +31,15 @@ async fn main() { if let Ok(server_name) = fs::read_to_string(mumlib::SOCKET_PATH) { if let Ok(tx0) = IpcSender::connect(server_name) { if tx0.send((Command::Ping, tx_client)).is_ok() { - if matches!(rx_client.recv().unwrap(), Ok(Some(CommandResponse::Pong))) { - error!("Another instance of mumd is already running"); - return; - } else { - warn!("Ping with no response. Continuing..."); + match rx_client.recv() { + Ok(Ok(Some(CommandResponse::Pong))) => { + error!("Another instance of mumd is already running"); + return; + }, + resp => { + warn!("Ping with weird response. Continuing..."); + debug!("Response was {:?}", resp); + } } } } |
