From 466c97291322c1c96a1f7336a5eaaee7e7c7e856 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 23 Jun 2024 09:57:40 -0400 Subject: [PATCH] don't use SUCCESS-PLUS unncessarily When dropping from a proxied remote that is not a cluster, SUCCESS-PLUS is not needed, so don't use it. --- P2P/Proxy.hs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/P2P/Proxy.hs b/P2P/Proxy.hs index 0ba3bfe290..8edba3c79d 100644 --- a/P2P/Proxy.hs +++ b/P2P/Proxy.hs @@ -292,11 +292,13 @@ proxy proxydone proxymethods servermode (ClientSide clientrunst clientconn) remo mapM_ (\u -> removedContent proxymethods u k) us protoerrhandler proxynextclientmessage $ client $ net $ sendMessage $ - if all (maybe False fst) v' - then if null us || protocolversion < 2 + let nonplussed = all (== remoteuuid) us + || protocolversion < 2 + in if all (maybe False fst) v' + then if nonplussed then SUCCESS else SUCCESS_PLUS us - else if null us || protocolversion < 2 + else if nonplussed then FAILURE else FAILURE_PLUS us -- 2.39.5