X-Git-Url: https://git.sesse.net/?p=cubemap;a=blobdiff_plain;f=httpinput.cpp;h=354e4b9885aa0d9be0622c4f85d1ec23e67be5d4;hp=46f1358927312ba210cfa2f518e29991595d14ed;hb=ca9624c43b968a0f29ea44e47851ff686bb64bb6;hpb=d60b2c17baf9b71e4a70a499fa1d34753821c822 diff --git a/httpinput.cpp b/httpinput.cpp index 46f1358..354e4b9 100644 --- a/httpinput.cpp +++ b/httpinput.cpp @@ -57,6 +57,18 @@ HTTPInput::HTTPInput(const InputProto &serialized) parse_url(url, &protocol, &host, &port, &path); // Don't care if it fails. } +void HTTPInput::close_socket() +{ + int ret; + do { + ret = close(sock); + } while (ret == -1 && errno == EINTR); + + if (ret == -1) { + perror("close()"); + } +} + InputProto HTTPInput::serialize() const { InputProto serialized;