Merge branch 'master' of /srv/git.sesse.net/www/cubemap
[cubemap] / httpinput.cpp
index 2a101bd..e113c57 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