]> git.sesse.net Git - cubemap/commitdiff
Merge branch 'master' of /srv/git.sesse.net/www/cubemap
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 21 Apr 2013 00:26:45 +0000 (02:26 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 21 Apr 2013 00:26:45 +0000 (02:26 +0200)
1  2 
httpinput.cpp

diff --combined httpinput.cpp
index 2a101bd31dd94fecd9fa7cd9021e31867131163e,e54aedba2f593711c08af8b9f614adf0fddfdc1c..e113c5717a76ac27ae6f1a52ae30c93a1b29e747
@@@ -1,3 -1,4 +1,3 @@@
 -#include <stdio.h>
  #include <assert.h>
  #include <errno.h>
  #include <netdb.h>
@@@ -8,7 -9,6 +8,7 @@@
  #include <string.h>
  #include <sys/ioctl.h>
  #include <sys/socket.h>
 +#include <time.h>
  #include <unistd.h>
  #include <map>
  #include <string>
@@@ -62,7 -62,9 +62,9 @@@ HTTPInput::HTTPInput(const InputProto &
  
  void HTTPInput::close_socket()
  {
-       safe_close(sock);
+       if (sock != -1) {
+               safe_close(sock);
+       }
  }
  
  InputProto HTTPInput::serialize() const