diff options
Diffstat (limited to 'runtime/ops/web_worker/sync_fetch.rs')
-rw-r--r-- | runtime/ops/web_worker/sync_fetch.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/runtime/ops/web_worker/sync_fetch.rs b/runtime/ops/web_worker/sync_fetch.rs index 2049d5ab8..ba5f325d6 100644 --- a/runtime/ops/web_worker/sync_fetch.rs +++ b/runtime/ops/web_worker/sync_fetch.rs @@ -8,7 +8,6 @@ use deno_core::op; use deno_core::url::Url; use deno_core::OpState; use deno_fetch::data_url::DataUrl; -use deno_fetch::reqwest; use deno_web::BlobStore; use deno_websocket::DomExceptionNetworkError; use hyper::body::Bytes; @@ -41,7 +40,7 @@ pub fn op_worker_sync_fetch( let handle = state.borrow::<WebWorkerInternalHandle>().clone(); assert_eq!(handle.worker_type, WebWorkerType::Classic); - let client = state.borrow::<reqwest::Client>().clone(); + let client = deno_fetch::get_or_create_client_from_state(state)?; // TODO(andreubotella) It's not good to throw an exception related to blob // URLs when none of the script URLs use the blob scheme. |