From ba0c306b950b45b1485c5445e6ab27e62066e0b5 Mon Sep 17 00:00:00 2001 From: Jeremy Evans Date: Tue, 27 Aug 2019 11:12:45 -0700 Subject: [PATCH] Do not send a reply to the client if there is a connection error This allows for normal TCP shutdown (fin-ack-fin-ack instead of fin-ack-push-rst). Patch from pierre@mouraf.org (Pierre-Alexandre Meyer). Fixes [Bug #2339] --- lib/drb/drb.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/drb/drb.rb b/lib/drb/drb.rb index caffd5df25..960ce9e8fc 100644 --- a/lib/drb/drb.rb +++ b/lib/drb/drb.rb @@ -1678,7 +1678,9 @@ def main_loop invoke_method = InvokeMethod.new(self, client) succ, result = invoke_method.perform error_print(result) if !succ && verbose - client.send_reply(succ, result) + unless result.kind_of?(DRbConnError) && result.message == 'connection closed' + client.send_reply(succ, result) + end rescue Exception => e error_print(e) if verbose ensure -- 2.22.0