fixing longpoll close process