From fdca8daec3e10c8d5389496f427d92383e0c2c67 Mon Sep 17 00:00:00 2001 From: Tomas Kopecek Date: Apr 20 2021 13:56:13 +0000 Subject: lib: is_conn_error catch more exceptions Related: https://pagure.io/koji/issue/2789 --- diff --git a/koji/__init__.py b/koji/__init__.py index 00e9dba..2253d63 100644 --- a/koji/__init__.py +++ b/koji/__init__.py @@ -2274,7 +2274,11 @@ def is_conn_error(e): # these values, this is a connection error. if getattr(e, 'errno', None) in (errno.ECONNRESET, errno.ECONNABORTED, errno.EPIPE): return True - if 'BadStatusLine' in str(e): + str_e = str(e) + if 'BadStatusLine' in str_e or \ + 'RemoteDisconnected' in str_e or \ + 'ConnectionReset' in str_e or \ + 'IncompleteRead' in str_e: # we see errors like this in keep alive timeout races # ConnectionError(ProtocolError('Connection aborted.', BadStatusLine("''",)),) return True