Skip to content
  • Rémi Denis-Courmont's avatar
    https: drain HTTP/2 output queue if possible · 8bff13ad
    Rémi Denis-Courmont authored
    The underlying TCP socket is mostly used for receiving. So in most
    cases, there is enough space in send buffers for the final packets
    (such as RST_STREAM and GOAWAY frames).
    
    This fixes a race condition where the output thread got cancelled
    before draining the queue. Now, it only gets cancelled if the send
    buffer is congested (i.e. it calls poll(POLLOUT)). In normal cases,
    the thread will exit explicitly after draining.
    8bff13ad