尝试从您的处理程序返回 {shutdown, Req, State} : https://github.com/extend/cowboy/blob/master/src/cowboy_websocket_handler.erl