]> git.sesse.net Git - cubemap/blobdiff - httpinput.cpp
Add a hack for starting at the _start_ of backlog. Useful for fetching samples of...
[cubemap] / httpinput.cpp
index 2a101bd31dd94fecd9fa7cd9021e31867131163e..7da8daa1d85e732be755236a780d010a82e9cd4e 100644 (file)
@@ -62,7 +62,9 @@ HTTPInput::HTTPInput(const InputProto &serialized)
 
 void HTTPInput::close_socket()
 {
-       safe_close(sock);
+       if (sock != -1) {
+               safe_close(sock);
+       }
 }
 
 InputProto HTTPInput::serialize() const
@@ -385,7 +387,7 @@ void HTTPInput::do_work()
 
                        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;