closing socket for firefox