mirror of
https://github.com/facebookincubator/mvfst.git
synced 2025-08-09 20:42:44 +03:00
Continue on network unreachable with timeout
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
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
|
||||
#include <quic/api/IoBufQuicBatch.h>
|
||||
#include <gtest/gtest.h>
|
||||
#include <quic/client/state/ClientStateMachine.h>
|
||||
#include <quic/state/StateData.h>
|
||||
|
||||
constexpr const auto kNumLoops = 64;
|
||||
@@ -52,10 +53,11 @@ void RunTest(int numBatch) {
|
||||
|
||||
auto batchWriter = std::make_unique<TestPacketBatchWriter>(numBatch);
|
||||
folly::SocketAddress peerAddress{"127.0.0.1", 1234};
|
||||
QuicClientConnectionState conn;
|
||||
QuicConnectionStateBase::HappyEyeballsState happyEyeballsState;
|
||||
|
||||
IOBufQuicBatch ioBufBatch(
|
||||
std::move(batchWriter), sock, peerAddress, happyEyeballsState);
|
||||
std::move(batchWriter), sock, peerAddress, conn, happyEyeballsState);
|
||||
|
||||
std::string strTest("Test");
|
||||
|
||||
|
Reference in New Issue
Block a user