

def is_disconnect(self, e, connection, cursor):
    for msg in ('Adaptive Server connection timed out', 'Net-Lib error during Connection reset by peer', 'message 20003', 'Error 10054', 'Not connected to any MS SQL server', 'Connection is closed', 'message 20006'):
        if (connection in str(e)):
            return True
    else:
        return False

dataset/ETHPy150Open zzzeek/sqlalchemy/lib/sqlalchemy/dialects/mssql/pymssql.py MSDialect_pymssql.is_disconnect/VarMisuse@39/104 `msg`->`connection`