Fixing websocket lifetime