Fix #19: Raise exception on waiting for SQL requiest on connection closing.