check if window get destroyed. if so fake an disconnect message