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
@@@ -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