Skip to content
Snippets Groups Projects
Commit d7d9f135 authored by Éloïs's avatar Éloïs
Browse files

[fix] ws2p1: cons open at stop must switch to status close at restart

parent 8e2ab6ba
No related branches found
No related tags found
1 merge request!143Resolve "WS2Pv1: add feature prefered pubkeys"
......@@ -494,6 +494,12 @@ impl DursModule<DuRsConf, DursMsg> for WS2PModule {
let ws2p_enpoints = ws2p_enpoints
.into_iter()
.filter(|(_, dal_ep)| cfg!(feature = "ssl") || dal_ep.ep.port != 443)
.map(|(node_full_id, mut dal_ep)| {
if dal_ep.state == WS2PConnectionState::Established {
dal_ep.state = WS2PConnectionState::Close;
}
(node_full_id, dal_ep)
})
.collect::<Vec<(NodeFullId, DbEndpoint)>>();
count = ws2p_enpoints.len();
ws2p_module.ws2p_endpoints.extend(ws2p_enpoints);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment