MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / is_benign_connection_close

Function is_benign_connection_close

crates/openshell-server/src/lib.rs:159–166  ·  view source on GitHub ↗
(error: &(dyn std::error::Error + 'static))

Source from the content-addressed store, hash-verified

157}
158
159fn is_benign_connection_close(error: &(dyn std::error::Error + 'static)) -> bool {
160 let msg = error.to_string();
161 msg.contains("connection closed")
162 || msg.contains("connection reset")
163 || msg.contains("connection error")
164 || msg.contains("error reading a body from connection")
165 || msg.contains("broken pipe")
166}
167
168impl ServerState {
169 /// Create new server state.

Callers 1

spawn_gateway_connectionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected