summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNarayan Kamath2017-09-13 07:12:34 -0500
committerNarayan Kamath2017-09-13 08:15:57 -0500
commitc2e98f63404bed1a08719463774a04a010bba68f (patch)
treefc051cc1d36d1ae27eb2ab52b6166933ab7e0198 /libdiskconfig
parent7176951b9b15a7b92320233485c9d508048fa791 (diff)
downloadplatform-system-core-c2e98f63404bed1a08719463774a04a010bba68f.tar.gz
platform-system-core-c2e98f63404bed1a08719463774a04a010bba68f.tar.xz
platform-system-core-c2e98f63404bed1a08719463774a04a010bba68f.zip
tombstoned: Fix calls to evconnlistener_new.
The order of arguments is wrong - we're passing flags=static_cast<unsigned>(-1) and backlog=LEV_OPT_CLOSE_ON_FREE (which is 2). On versions of libevent prior to 2.1.8, this ends up accidentally setting OPT_LEAVE_SOCKETS_BLOCKING, OPT_CLOSE_ON_EXEC, OPT_REUSABLE and OPT_THREADSAFE and limiting our backlog to two. These unintentional changes are relatively benign; we never make our sockets block, we never exec, we never reuse sockets and the additional locking overhead should be negligible. The backlog of two might be a problem in theory, but there haven't been any reports of issues caused by it. Things get worse on 2.1.8 - that version introduces several new flags, one of which is OPT_DISABLED. This disables the new listener by default, which means that our event loop returns early because it has no active listeners for any of its events. Bug: 64543673 Test: Manual. Change-Id: I9954bc7fe1af761de1a950d935dd2e6ce7e2c5f5
Diffstat (limited to 'libdiskconfig')
0 files changed, 0 insertions, 0 deletions