Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(183)

Unified Diff: net/tools/quic/quic_client.cc

Issue 14287009: Land Recent QUIC Changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with Tot Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/tools/quic/end_to_end_test.cc ('k') | net/tools/quic/quic_dispatcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/quic_client.cc
diff --git a/net/tools/quic/quic_client.cc b/net/tools/quic/quic_client.cc
index 7d033904ff6a5064a070f84cb66552b27000c548..ff8502f012d6fb4c23d34ac48a39044fa9d32a6f 100644
--- a/net/tools/quic/quic_client.cc
+++ b/net/tools/quic/quic_client.cc
@@ -127,7 +127,6 @@ bool QuicClient::Connect() {
return session_->connection()->connected();
}
-
bool QuicClient::StartConnect() {
DCHECK(!connected() && initialized_);
@@ -154,7 +153,6 @@ void QuicClient::Disconnect() {
epoll_server_.UnregisterFD(fd_);
close(fd_);
fd_ = -1;
- session_.reset();
}
void QuicClient::SendRequestsAndWaitForResponse(int argc, char *argv[]) {
@@ -192,10 +190,10 @@ void QuicClient::OnEvent(int fd, EpollEvent* event) {
DCHECK_EQ(fd, fd_);
if (event->in_events & EPOLLIN) {
- while (ReadAndProcessPacket()) {
+ while (connected() && ReadAndProcessPacket()) {
}
}
- if (event->in_events & EPOLLOUT) {
+ if (connected() && (event->in_events & EPOLLOUT)) {
session_->connection()->OnCanWrite();
}
if (event->in_events & EPOLLERR) {
« no previous file with comments | « net/tools/quic/end_to_end_test.cc ('k') | net/tools/quic/quic_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698