Merge #11593: rpc: work-around an upstream libevent bug
commit7008b07005c50ca2865ead36f5b3cee0c8d1bacc
authorWladimir J. van der Laan <laanwj@gmail.com>
Thu, 2 Nov 2017 19:10:23 +0000 (2 20:10 +0100)
committerWladimir J. van der Laan <laanwj@gmail.com>
Thu, 2 Nov 2017 19:11:08 +0000 (2 20:11 +0100)
tree414e328707fadb3c89c1eb8eb07ebd04fb7a24c3
parentbfb270acfa30713dc8c968bb9ee40cf5a2360359
parent97932cd2689659addfbb58dc6148928b73af3bd0
Merge #11593: rpc: work-around an upstream libevent bug

97932cd rpc: further constrain the libevent workaround (Cory Fields)
6b58360 rpc: work-around an upstream libevent bug (Cory Fields)

Pull request description:

  A rare race condition may trigger while awaiting the body of a message.

  This may fix some reported rpc hangs/crashes.

  This work-around mimics what libevent does internally once a write has started, which is what usually happens, but not always due to the processing happening on a different thread: https://github.com/libevent/libevent/blob/e7ff4ef2b4fc950a765008c18e74281cdb5e7668/http.c#L373

  Fixed upstream at: https://github.com/libevent/libevent/commit/5ff8eb26371c4dc56f384b2de35bea2d87814779

Tree-SHA512: b9fa97cae9da2a44101c5faf1e3be0b9cbdf722982d35541cf224be31430779c75e519c8ed18d06ab7487bfb1211069b28f22739f126d6c28ca62d3f73b79a52