diff options
author | Yabin Cui <yabinc@google.com> | 2015-09-29 12:25:33 -0700 |
---|---|---|
committer | Yabin Cui <yabinc@google.com> | 2015-09-30 15:03:26 -0700 |
commit | aa77e22d7384a97757e2d2194f4e265f7ad3b71a (patch) | |
tree | 9fbcc3dbd66c1cdae1a50656b0e15e831eb6fc99 /libutils/FileMap.cpp | |
parent | d490db9824cdb4974da22ba80399f39a8b44ec08 (diff) |
adb: detect sockets in CLOSE_WAIT state to prevent socket leak on linux.
It is possible that the adb server on host has many sockets in
CLOSE_WAIT state. To prevent socket leak, always enable POLLRDHUP
in fdevent.cpp to detect sockets in CLOSE_WAIT state.
Update LocalSocketTest unit tests:
Change half_close_with_packet to read_from_closing_socket, as reading
from a SHUT_WR socket is not needed in adb.
Change close_with_no_events_installed to close_socket_in_CLOSE_WAIT_state,
as the latter is more close to the real situation in use.
Bug: 23314034
Change-Id: Ice4f4036624e5584eab6ba5848e7f169c92f037f
Diffstat (limited to 'libutils/FileMap.cpp')
0 files changed, 0 insertions, 0 deletions