send quit command before disconnect