Fixed Downloader.
This commit is contained in:
@@ -102,7 +102,6 @@ public:
|
|||||||
totalSize = mTotalSize;
|
totalSize = mTotalSize;
|
||||||
currentSize = mCurrentSize;
|
currentSize = mCurrentSize;
|
||||||
};
|
};
|
||||||
void waitUntilCompleted();
|
|
||||||
|
|
||||||
friend ostream& operator<<(ostream& out, const DownloadRequest& d);
|
friend ostream& operator<<(ostream& out, const DownloadRequest& d);
|
||||||
friend istream& operator>>(istream&, DownloadRequest&);
|
friend istream& operator>>(istream&, DownloadRequest&);
|
||||||
|
|||||||
@@ -89,19 +89,6 @@ void DownloadRequest::onProgressCb(unsigned int handle, DownloadRequest* req, in
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void DownloadRequest::waitUntilCompleted()
|
|
||||||
{
|
|
||||||
while(mDownloadStatus != DownloadRequest::DOWNLOAD_ERROR && mDownloadStatus != DownloadRequest::DOWNLOADED )
|
|
||||||
{
|
|
||||||
#ifdef __EMSCRIPTERN
|
|
||||||
emscripten_sleep_with_yield(100)
|
|
||||||
#else
|
|
||||||
sleep(100);
|
|
||||||
#endif
|
|
||||||
DebugTrace("DownloadRequest::waitUntilCompleted");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void DownloadRequest::processError(int errorCode, const char* errorText)
|
void DownloadRequest::processError(int errorCode, const char* errorText)
|
||||||
{
|
{
|
||||||
DebugTrace(errorText);
|
DebugTrace(errorText);
|
||||||
|
|||||||
Reference in New Issue
Block a user