spdycat: Log if set_tcp_nodelay() failed

This commit is contained in:
Tatsuhiro Tsujikawa 2013-01-25 22:02:27 +09:00
parent f0fc026799
commit f6c0061117
1 changed files with 4 additions and 1 deletions

View File

@ -590,7 +590,10 @@ int communicate(const std::string& host, uint16_t port,
<< std::endl; << std::endl;
return -1; return -1;
} }
set_tcp_nodelay(fd); if(set_tcp_nodelay(fd) == -1) {
std::cerr << "Setting TCP_NODELAY failed: " << strerror(errno)
<< std::endl;
}
std::string next_proto; std::string next_proto;
switch(config.spdy_version) { switch(config.spdy_version) {