mirror of
https://github.com/moparisthebest/spdylay
synced 2024-11-17 23:15:07 -05:00
spdycat: Output error messages to std::cerr
This commit is contained in:
parent
37cb94d154
commit
2e3cd7d04f
@ -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,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
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,
|
|||||||
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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user