• Show log

    Commit

  • Hash : 5a455acd
    Author : Azat Khuzhin
    Date : 2018-10-17T23:21:17

    Fix hangs due to watermarks overruns in bufferevents implementations
    
    Some implementations of bufferevents (for example openssl) can overrun
    read high watermark.
    And after this if user callback will not drain enough data it will be
    suspended (i.e. it will not be runned again anymore).
    This is not the expecting behaviour as one may guess, since in this case
    the data will never be read. Hence once we detected that the watermark
    exceeded (even after calling user callback) we will schedule the
    callback again.
    
    This also can be fixed in bufferevent openssl implementation (by
    strictly limiting how much data is added to the read buffer according to
    read high watermark), but since this data is already available (and in
    memory) there is no point in doing so.