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 c30651e..e54aedb 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