add refresh to close the websocket.