From: Steinar H. Gunderson Date: Sun, 21 Apr 2013 00:26:35 +0000 (+0200) Subject: Fix a (harmless) close() warning that would come if we deleted a HTTP input that... X-Git-Tag: 1.0.0~49^2 X-Git-Url: https://git.sesse.net/?p=cubemap;a=commitdiff_plain;h=8b38253eca5071946b12579541f2095ccbad2e1e Fix a (harmless) close() warning that would come if we deleted a HTTP input that was not connected. --- diff --git a/httpinput.cpp b/httpinput.cpp index c30651e..e54aedb 100644 --- a/httpinput.cpp +++ b/httpinput.cpp @@ -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