Skip to content

Commit 87d75c1

Browse files
committed
RenetSteam: close connections occured from disconnects in renet.
1 parent 84a2e9b commit 87d75c1

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

renet_steam/src/server.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,13 @@ impl SteamServerTransport {
159159
});
160160
}
161161
}
162+
163+
for disconnection_id in server.disconnections_id() {
164+
server.remove_connection(disconnection_id);
165+
if let Some(connection) = self.connections.remove(&disconnection_id) {
166+
connection.close(NetConnectionEnd::App(AppNetConnectionEnd::generic_normal()), Some("Renet"), false);
167+
}
168+
}
162169
}
163170

164171
/// Send packets to connected clients.

0 commit comments

Comments
 (0)