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:
parent
623433e833
commit
362340c32c
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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)
|
||||
|
@ -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,
|
||||
|
@ -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.
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user