fix(gateway): don't return error when client disconnected (#7504)

When a client disconnects, we clear up the connection on the gateway.
There might still be packets arriving from resources that we then cannot
route. This isn't worth returning an error.
This commit is contained in:
Thomas Eizinger
2024-12-13 15:54:07 +11:00
committed by GitHub
parent b5d6c27680
commit f30cc3226d

View File

@@ -90,10 +90,10 @@ impl GatewayState {
return Ok(None);
}
let peer = self
.peers
.peer_by_ip_mut(dst)
.context("Couldn't find connection by IP")?;
let Some(peer) = self.peers.peer_by_ip_mut(dst) else {
tracing::debug!(%dst, "Unknown client, perhaps already disconnected?");
return Ok(None);
};
let cid = peer.id();
let packet = peer