• Kenton Varda's avatar
    Fix handling of disconnect during WebSocket::pumpTo(). · ce83d192
    Kenton Varda authored
    Before this change, if *either* the `from` or the `to` end of the pump threw a DISCONNECTED exception, we'd then try to call `to.disconnect()`. But if the exception had been thrown from `to` in the first place, then this would throw again, this time complaining about a previous write not having completed. But the whole point was always to propagate errors from the *receiving* end to the sending end. An error on the sending end should just propagate up the stack.
    ce83d192
async-io.c++ 52.9 KB