void HTTPInput::close_socket()
{
- safe_close(sock);
+ if (sock != -1) {
+ safe_close(sock);
+ }
}
InputProto HTTPInput::serialize() const
if (ret == 0) {
// This really shouldn't happen...
- log(ERROR, "[%s] Socket unexpectedly closed while reading header",
+ log(ERROR, "[%s] Socket unexpectedly closed while reading data",
url.c_str());
state = CLOSING_SOCKET;
continue;