1
0
mirror of https://github.com/facebookincubator/mvfst.git synced 2025-04-18 17:24:03 +03:00

log whether quic socket readable

Summary:
**Context**: adding more debugging to catch the 0RTT bug.

Wonder if the client is down to read more data. There could presumably be some bug with 0RTT + happy eyeballs where the socket isnt working.

Reviewed By: lnicco

Differential Revision: D72266611

fbshipit-source-id: 6420017efcb200dd04bb7070c6c31049bcee8148
This commit is contained in:
Paul Farcasanu 2025-04-03 11:45:33 -07:00 committed by Facebook GitHub Bot
parent 623433e833
commit 362340c32c
5 changed files with 15 additions and 0 deletions

View File

@ -1939,6 +1939,10 @@ uint64_t QuicClientTransportLite::getPacketsSentCount() const {
return conn_->lossState.totalPacketsSent;
}
bool QuicClientTransportLite::canRead() const {
return socket_ && !socket_->isReadPaused();
}
const std::shared_ptr<const folly::AsyncTransportCertificate>
QuicClientTransportLite::getPeerCertificate() const {
const auto clientHandshakeLayer = clientConn_->clientHandshakeLayer;

View File

@ -238,6 +238,7 @@ class QuicClientTransportLite
uint64_t getPtoCount() const;
uint64_t getPacketsSentCount() const;
bool canRead() const;
const std::shared_ptr<const folly::AsyncTransportCertificate>
getPeerCertificate() const override;

View File

@ -47,6 +47,10 @@ void LibevQuicAsyncUDPSocket::pauseRead() {
removeEvent(EV_READ);
}
bool LibevQuicAsyncUDPSocket::isReadPaused() const {
return readCallback_ == nullptr;
}
void LibevQuicAsyncUDPSocket::resumeRead(ReadCallback* cb) {
CHECK(!readCallback_) << "A read callback is already installed";
CHECK_NE(fd_, -1)

View File

@ -34,6 +34,8 @@ class LibevQuicAsyncUDPSocket : public QuicAsyncUDPSocketImpl {
void pauseRead() override;
[[nodiscard]] bool isReadPaused() const override;
ssize_t write(
const folly::SocketAddress& address,
const struct iovec* vec,

View File

@ -137,6 +137,10 @@ class QuicAsyncUDPSocket {
*/
virtual void pauseRead() = 0;
[[nodiscard]] virtual bool isReadPaused() const {
return false;
}
/**
* Start listening to writable events on the socket.
*/