http: Guard against double close of WebSocket