Skip to content

Commit

Permalink
Allow missing gameservers to not have port (googleforgames#598)
Browse files Browse the repository at this point in the history
When gameservers are deleted, their port is removed. This fixes it so that the gameserver will have a port of zero instead of returning an error.
  • Loading branch information
XAMPPRocky authored Sep 20, 2022
1 parent 657dc41 commit 8598229
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/config/watch/agones/crd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ impl TryFrom<GameServer> for Endpoint {
.ports
.as_ref()
.and_then(|ports| ports.first().map(|status| status.port))
.ok_or_else(|| tonic::Status::internal("No port found for game server"))?;
.unwrap_or_default();
let filter_metadata = crate::endpoint::Metadata { tokens };
Ok(Self::with_metadata((address, port).into(), filter_metadata))
}
Expand Down

0 comments on commit 8598229

Please sign in to comment.