Summary: We send conn close packets when network is un-rechable, this task fixes the issue and we no longer send conn close frames when network is un-rechable.
Reviewed By: yangchi, lnicco
Differential Revision: D18469028
fbshipit-source-id: 3090b6b3d63e1fc9448b8d945c645f4da8747ffc
Summary:
Becuase closeImpl will write again. Ideally in this case we should just
abandon the connection, but putting this bandage to prevent crash for now
Reviewed By: siyengar
Differential Revision: D15295421
fbshipit-source-id: d098e790c0c2609d817f5d1d3689858aa80a8b73
Summary:
Close the socket when fatal error occurred. This prevents quic transport from receiving readCallback from a bad socket.
Also, close the happy eyeball socket when transport is shutdown.
Reviewed By: siyengar
Differential Revision: D15264105
fbshipit-source-id: e6c33f626cdef6a4ebc6820e39ac78da525133d0
Summary:
Previously we decided to be conservative and error out the connetion
when either of the 2 sockets fails to write. This makes the happy eyeballs
component meaningless for e.g. IPv4 only network cases. This time we try to do it right.
The connection will keep track `shouldWrite` bool for both sockets. `shouldWriteToFirstSocket` is initialized to true and `shouldWriteToSecond` is initialized to false. Whenever **fatal** error occurs on a socket, the corresponding `shouldWrite` bool is changed to false. We are not finishing happy eyeballs state immediately but delaying this action to when we receive data back.
Reviewed By: siyengar
Differential Revision: D15261148
fbshipit-source-id: 3ee7de81a1d579e418be36bc2800d93d414abe3d
Summary:
Previously we tried continue on network down and it showed good
improvement. But there was a problem: it hurts UX for airplane mode users, it
didn't return error back to user immediately but after 30/60 seconds timeout.
This adds a timer for this feature and it only allows the transport to ignore
network unreachable error for 200ms. After 200ms, it throws and reports to user
if the error persists.
Reviewed By: siyengar
Differential Revision: D15089442
fbshipit-source-id: dd87f4f579187c4b45244a7ee0477d2a0cf1b5d7