'Return true if exc is ECONNRESET or equivalent.
May be overridden in subclasses.'

def _is_connreset(self, exc):

    return (isinstance(exc, (socket.error, IOError)) and (errno_from_exception(exc) in _ERRNO_CONNRESET))
