Commit 2e3cd7d0 authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

spdycat: Output error messages to std::cerr

parent 37cb94d1
...@@ -613,8 +613,8 @@ int spdy_evloop(int fd, SSL *ssl, int spdy_version, SpdySession& spdySession, ...@@ -613,8 +613,8 @@ int spdy_evloop(int fd, SSL *ssl, int spdy_version, SpdySession& spdySession,
int rv; int rv;
if((rv = sc.recv()) != 0 || (rv = sc.send()) != 0) { if((rv = sc.recv()) != 0 || (rv = sc.send()) != 0) {
if(rv != SPDYLAY_ERR_EOF || !spdySession.all_requests_processed()) { if(rv != SPDYLAY_ERR_EOF || !spdySession.all_requests_processed()) {
std::cout << "Fatal: " << spdylay_strerror(rv) << std::endl; std::cerr << "Fatal: " << spdylay_strerror(rv) << "\n"
std::cout << "reqnum=" << spdySession.reqvec.size() << "reqnum=" << spdySession.reqvec.size()
<< ", completed=" << spdySession.complete << std::endl; << ", completed=" << spdySession.complete << std::endl;
} }
result = -1; result = -1;
...@@ -622,7 +622,7 @@ int spdy_evloop(int fd, SSL *ssl, int spdy_version, SpdySession& spdySession, ...@@ -622,7 +622,7 @@ int spdy_evloop(int fd, SSL *ssl, int spdy_version, SpdySession& spdySession,
} }
} }
if((pollfds[0].revents & POLLHUP) || (pollfds[0].revents & POLLERR)) { if((pollfds[0].revents & POLLHUP) || (pollfds[0].revents & POLLERR)) {
std::cout << "HUP" << std::endl; std::cerr << "HUP" << std::endl;
result = -1; result = -1;
break; break;
} }
...@@ -639,7 +639,7 @@ int spdy_evloop(int fd, SSL *ssl, int spdy_version, SpdySession& spdySession, ...@@ -639,7 +639,7 @@ int spdy_evloop(int fd, SSL *ssl, int spdy_version, SpdySession& spdySession,
ctl_poll(pollfds, &sc); ctl_poll(pollfds, &sc);
} }
if(!spdySession.all_requests_processed()) { if(!spdySession.all_requests_processed()) {
std::cout << "Some requests were not processed. total=" std::cerr << "Some requests were not processed. total="
<< spdySession.reqvec.size() << spdySession.reqvec.size()
<< ", processed=" << spdySession.complete << std::endl; << ", processed=" << spdySession.complete << std::endl;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment