Check brokerEvent and brokerSession pointers before disconnect -- due the delay instance creation for inst control, those pointers may not be created when close app.