Make sure we send the CLOSE frame when closing the websockets