X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/42195eb2ff28c597dd9d2eeddd05ea4c7b146af8..3b77265bc282dd7295faed84b25d7c82c7103386:/methods/http.cc diff --git a/methods/http.cc b/methods/http.cc index 1c3f61caa..4521197ed 100644 --- a/methods/http.cc +++ b/methods/http.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: http.cc,v 1.52 2001/05/27 23:53:55 jgg Exp $ +// $Id: http.cc,v 1.54 2002/04/18 05:09:38 jgg Exp $ /* ###################################################################### HTTP Aquire Method - This is the HTTP aquire method for APT. @@ -726,7 +726,11 @@ bool HttpMethod::Go(bool ToFile,ServerState *Srv) tv.tv_usec = 0; int Res = 0; if ((Res = select(MaxFd+1,&rfds,&wfds,0,&tv)) < 0) + { + if (errno == EINTR) + return true; return _error->Errno("select","Select failed"); + } if (Res == 0) { @@ -1138,6 +1142,9 @@ int HttpMethod::Loop() // Hard internal error, kill the connection and fail case 5: { + delete File; + File = 0; + Fail(); RotateDNS(); Server->Close(); @@ -1175,3 +1182,5 @@ int main() return Mth.Loop(); } + +