summaryrefslogtreecommitdiff
path: root/libpackagelistparser/packagelistparser_test.cpp
diff options
context:
space:
mode:
authorJosh Gao <jmgao@google.com>2018-09-20 17:38:14 -0700
committerJosh Gao <jmgao@google.com>2018-10-04 14:01:07 -0700
commitffc11d3cf3643c24780f902386be61851531f022 (patch)
treed10c0e5506bf830f1b40690512bc906b105266f3 /libpackagelistparser/packagelistparser_test.cpp
parenta3303fd21bfc2501fa361c8efa28da7a947cc3c4 (diff)
adb: don't close sockets before hitting EOF.
The standard (RFC 1122 - 4.2.2.13) says that if we call close on a socket while we have pending data, a TCP RST should be sent to the other end to notify it that we didn't read all of its data. However, this can result in data that we've succesfully written out to be dropped on the other end. To avoid this, instead of immediately closing a socket, call shutdown on it instead, and then read from the file descriptor until we hit EOF or an error before closing. Bug: http://b/74616284 Test: ./test_adb.py Test: ./test_device.py Change-Id: I36f72bd14965821dc23de82774b0806b2db24f13
Diffstat (limited to 'libpackagelistparser/packagelistparser_test.cpp')
0 files changed, 0 insertions, 0 deletions