]> git.sesse.net Git - cubemap/commitdiff
Fix a (harmless) close() warning that would come if we deleted a HTTP input that...
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 21 Apr 2013 00:26:35 +0000 (02:26 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 21 Apr 2013 00:26:35 +0000 (02:26 +0200)
httpinput.cpp

index c30651ed3e5c42100a7f5cc0d16f56e8b7c7751f..e54aedba2f593711c08af8b9f614adf0fddfdc1c 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