platform_system_core/adb
Josh Gao 184f480547 adb: don't immediately close a socket when write fails.
When we fail to write to a local socket peer, we might still have data
queued up to send to the other side. Defer closing the socket until
we've failed to both read and write.

Bug: http://b/74616284
Test: python test_device.py
Change-Id: Ifc4b8fe95369b4872e475c2ae4ee611dd2d8b9d7
2018-03-21 15:13:07 -07:00
..
client adb: implement std::make_unique, start using it. 2018-03-16 15:35:52 -07:00
daemon Merge changes I99b85f07,If28f6c8d 2018-03-19 20:14:33 +00:00
sysdeps adb: implement std::make_unique, start using it. 2018-03-16 15:35:52 -07:00
.clang-format Remove extraneous .clang-format files 2017-03-14 14:06:31 -07:00
adb.cpp adb: convert Connection to a nonblocking interface. 2018-03-05 13:00:28 -08:00
adb.h adb: switch apacket over to a std::string payload. 2018-02-21 14:30:17 -08:00
adb_auth.h adb: switch apacket over to a std::string payload. 2018-02-21 14:30:17 -08:00
adb_io.cpp adb: increase the shell command length limit. 2017-06-16 18:01:11 -07:00
adb_io.h
adb_io_test.cpp
adb_listeners.cpp adb: implement std::make_unique, start using it. 2018-03-16 15:35:52 -07:00
adb_listeners.h adb: move all cleanup to a function with defined ordering. 2017-05-09 14:32:47 -07:00
adb_listeners_test.cpp
adb_mdns.h Add mDNS device discovery for adb client 2017-03-07 14:45:51 -08:00
adb_trace.cpp adb: don't spew to logcat when tracing is enabled. 2018-02-06 15:55:06 -08:00
adb_trace.h adb: don't spew to logcat when tracing is enabled. 2018-02-06 15:55:06 -08:00
adb_unique_fd.h adb: extract the adb-specific unique_fd out into its own header. 2016-09-01 15:49:06 -07:00
adb_utils.cpp Indicate that a packet was truncated. 2017-06-27 13:26:14 -07:00
adb_utils.h Give a clear error message if we can't start the server. 2017-06-20 14:21:41 -07:00
adb_utils_test.cpp adb: allow symlinks to directories in directory_exists. 2017-03-23 16:19:55 -07:00
Android.bp adbd: make static. 2018-03-06 13:01:34 -08:00
bugreport_test.cpp Merge "Don't preserve file attributes when pulling bugreport file..." 2017-08-22 22:41:26 +00:00
fdevent.cpp adb: make fdevent_run_on_main_thread's fd nonblocking. 2018-03-20 13:23:06 -07:00
fdevent.h adb: add fdevent_run_on_main_thread. 2017-05-04 16:03:12 -07:00
fdevent_test.cpp adb: make fdevent_run_on_main_thread's fd nonblocking. 2018-03-20 13:23:06 -07:00
fdevent_test.h adb: add fdevent_run_on_main_thread. 2017-05-04 16:03:12 -07:00
file_sync_service.h Add --sync support to push. 2017-05-19 11:09:58 -07:00
MODULE_LICENSE_APACHE2
NOTICE adb: append the libwinpthread COPYING to adb's NOTICE. 2017-03-08 21:27:59 -08:00
OVERVIEW.TXT Fix typos in ADB documentation 2017-11-30 10:57:51 -08:00
OWNERS Add OWNERS. 2017-12-07 13:30:03 -08:00
protocol.txt adb: convert Connection to a nonblocking interface. 2018-03-05 13:00:28 -08:00
range.h adb: switch asocket::enqueue to std::string. 2018-02-06 12:59:06 -08:00
remount_service.h
security_log_tags.h
services.cpp Fix a memory leak 2018-02-19 01:05:56 -08:00
services.h
SERVICES.TXT
shell_service.h
shell_service_protocol.cpp
shell_service_protocol_test.cpp adb: fix undefined behavior 2016-10-19 19:39:44 -07:00
socket.h adb: fix build breakage. 2018-02-12 18:03:49 -08:00
socket_spec.cpp Add std::string StartsWith*/EndsWith* overloads. 2017-12-20 09:42:22 -08:00
socket_spec.h adb: parse tcp socket specs with base::ParseNetAddress. 2016-09-20 13:55:43 -07:00
socket_spec_test.cpp adb: parse tcp socket specs with base::ParseNetAddress. 2016-09-20 13:55:43 -07:00
socket_test.cpp adb: don't immediately close a socket when write fails. 2018-03-21 15:13:07 -07:00
sockets.cpp adb: don't immediately close a socket when write fails. 2018-03-21 15:13:07 -07:00
sockets.dia
SYNC.TXT Fix typos in ADB documentation 2017-11-30 10:57:51 -08:00
sysdeps.h base: export GetThreadId. 2018-03-16 15:35:52 -07:00
sysdeps_test.cpp adb: enable -Wthread-safety on linux/darwin. 2017-05-03 14:28:21 -07:00
sysdeps_unix.cpp
sysdeps_win32.cpp Revert "adb: check our socketpair ends in our win32 emulation." 2017-03-30 13:12:37 -07:00
sysdeps_win32_test.cpp adb: add script to trace adbd. 2016-12-13 14:31:17 -08:00
test_adb.py adb: skip IPv6 test if IPv6 isn't available. 2018-03-19 18:19:47 -07:00
test_device.py adb: add adb shell exit 42 stress test. 2018-03-19 16:14:53 -07:00
trace.sh adb: add script to trace adbd. 2016-12-13 14:31:17 -08:00
transport.cpp adb: implement std::make_unique, start using it. 2018-03-16 15:35:52 -07:00
transport.h adb: remove meaningless const. 2018-03-05 13:00:28 -08:00
transport_local.cpp adb: implement std::make_unique, start using it. 2018-03-16 15:35:52 -07:00
transport_test.cpp adb: extract atransport's connection interface. 2018-01-30 15:22:41 -08:00
transport_usb.cpp adb: implement std::make_unique, start using it. 2018-03-16 15:35:52 -07:00
usb.h adb: get libusb compiling on Windows. 2017-12-08 13:11:15 -08:00