From d7d9f135ecd6d368f26cc461d618b3eb62e87326 Mon Sep 17 00:00:00 2001
From: librelois <elois@ifee.fr>
Date: Sun, 5 May 2019 22:54:25 +0200
Subject: [PATCH] [fix] ws2p1: cons open at stop must switch to status close at
restart
---
lib/modules/ws2p-v1-legacy/src/lib.rs | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/lib/modules/ws2p-v1-legacy/src/lib.rs b/lib/modules/ws2p-v1-legacy/src/lib.rs
index f70e5df0..768ab210 100644
--- a/lib/modules/ws2p-v1-legacy/src/lib.rs
+++ b/lib/modules/ws2p-v1-legacy/src/lib.rs
@@ -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);
--
GitLab