1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-09 03:52:19 +02:00

Fixed ability to cancel downloads

This commit is contained in:
Brian Fiete 2019-09-04 10:27:37 -07:00
parent 43c82515fe
commit d26e2957b0
7 changed files with 82 additions and 17 deletions

View file

@ -17,6 +17,7 @@ class NetResult;
#ifdef BF_CURL
typedef void CURL;
typedef void CURLM;
#endif
class NetRequest : public ThreadPool::Job
@ -30,9 +31,10 @@ public:
FileStream mOutFile;
#ifdef BF_CURL
CURL* mCURL;
CURLM* mCURLMulti;
#else
#endif
bool mCancelling;
volatile bool mCancelling;
bool mFailed;
String mError;
uint32 mLastUpdateTick;
@ -45,6 +47,7 @@ public:
mLastUpdateTick = 0;
#ifdef BF_CURL
mCURL = NULL;
mCURLMulti = NULL;
#else
#endif
mCancelling = false;
@ -90,6 +93,7 @@ public:
Array<NetResult*> mOldResults;
SyncEvent mRequestDoneEvent;
NetResult* mWaitingResult;
NetRequest* mWaitingRequest;
public:
NetManager();