diff --git a/lime/_backend/native/NativeHTTPRequest.hx b/lime/_backend/native/NativeHTTPRequest.hx index 5fea0fa76..71ae68853 100644 --- a/lime/_backend/native/NativeHTTPRequest.hx +++ b/lime/_backend/native/NativeHTTPRequest.hx @@ -386,14 +386,16 @@ class NativeHTTPRequest { private static function threadPool_onComplete (state:Dynamic):Void { - state.promise.complete (state.result); + var promise:Promise = state.promise; + promise.complete (state.result); } private static function threadPool_onError (state:Dynamic):Void { - state.promise.error (state.error); + var promise:Promise = state.promise; + promise.error (state.error); }