only call disable_analyzer if the connection is still open.