Issue metadata
Sign in to add a comment
|
Extensions TCP Socket API error out on reading 0 byte |
||||||||||||||||||||||||
Issue descriptioninternal bug: 110354086 On receiving 0 byte from the network, network::TCPConnectedSocket::ShutdownReceive closes the producer side of the receive pipe. When this happens, MojoDataPump::ReceiveMore will get result != MOJO_RESULT_OK and invoke the read callback with net::ERR_FAILED. This broke a CrOS app that uses the TCP socket API. The fix is to not error out when mojo pipe is closed, and consider all read errors to be connection close.
,
Aug 24
,
Aug 24
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/37e44dbf60a0fb7bd98acb9be976209c51ab4561 commit 37e44dbf60a0fb7bd98acb9be976209c51ab4561 Author: Helen Li <xunjieli@chromium.org> Date: Fri Aug 24 21:24:32 2018 Extensions TCP socket API. Do not error out on EOF On receiving 0 byte from the network, network::TCPConnectedSocket::ShutdownReceive closes the producer side of the receive pipe. When this happens, MojoDataPump::ReceiveMore will get result != MOJO_RESULT_OK and invoke the read callback with net::ERR_FAILED. This broke a CrOS app that uses the TCP socket API. The fix is to not error out when mojo pipe is closed, and consider all read errors to be connection close. BUG= 877167 Change-Id: I9ec8eb58110b3f255d8ef380f111eec278797fcb Reviewed-on: https://chromium-review.googlesource.com/1187076 Reviewed-by: Reilly Grant <reillyg@chromium.org> Commit-Queue: Helen Li <xunjieli@chromium.org> Cr-Commit-Position: refs/heads/master@{#585995} [modify] https://crrev.com/37e44dbf60a0fb7bd98acb9be976209c51ab4561/chrome/browser/extensions/api/socket/tcp_socket_unittest.cc [modify] https://crrev.com/37e44dbf60a0fb7bd98acb9be976209c51ab4561/chrome/browser/extensions/api/socket/tls_socket_unittest.cc [modify] https://crrev.com/37e44dbf60a0fb7bd98acb9be976209c51ab4561/chrome/test/data/extensions/api_test/socket/api/background.js [modify] https://crrev.com/37e44dbf60a0fb7bd98acb9be976209c51ab4561/extensions/browser/api/socket/mojo_data_pump.cc [modify] https://crrev.com/37e44dbf60a0fb7bd98acb9be976209c51ab4561/extensions/browser/api/socket/mojo_data_pump_unittest.cc [modify] https://crrev.com/37e44dbf60a0fb7bd98acb9be976209c51ab4561/extensions/browser/api/socket/tcp_socket.cc [modify] https://crrev.com/37e44dbf60a0fb7bd98acb9be976209c51ab4561/extensions/browser/api/socket/tls_socket.cc
,
Aug 24
|
|||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||
Comment 1 by xunji...@chromium.org
, Aug 23