CLOUD: Change Request::handle()

With new ConnectionManager upgrade Requests indicate that they are
finished with RequestInfo.state. No need to use handle() return value
anymore.
This commit is contained in:
Alexander Tkachev 2016-05-26 19:09:06 +06:00
parent f4547f44df
commit a7b28605a0
9 changed files with 16 additions and 29 deletions

View file

@ -37,17 +37,14 @@ CurlRequest::~CurlRequest() {
if (_stream) delete _stream;
}
bool CurlRequest::handle() {
void CurlRequest::handle() {
if (!_stream) _stream = new NetworkReadStream(_url, _headersList, _postFields);
if (_stream && _stream->eos()) {
if (_stream->httpResponseCode() != 200)
warning("HTTP response code is not 200 OK (it's %ld)", _stream->httpResponseCode());
ConnMan.getRequestInfo(_id).state = Networking::FINISHED;
return true;
ConnMan.getRequestInfo(_id).state = Networking::FINISHED;
}
return false;
}
void CurlRequest::restart() {