From f5abe0bcc0298a37c544091ff5fae3b9816ea03c Mon Sep 17 00:00:00 2001 From: Daniel Schierbeck Date: Thu, 26 Oct 2017 16:00:17 +0200 Subject: [PATCH] Rescue all system call errors --- lib/kafka/connection.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/kafka/connection.rb b/lib/kafka/connection.rb index 377e4dc4d..665f316f9 100644 --- a/lib/kafka/connection.rb +++ b/lib/kafka/connection.rb @@ -109,10 +109,10 @@ def send_request(request) response end - rescue Errno::EPIPE, Errno::ECONNRESET, Errno::ETIMEDOUT, EOFError => e + rescue SystemCallError, EOFError => e close - raise ConnectionError, "Connection error: #{e}" + raise ConnectionError, "Connection error #{e.class}: #{e}" end private