mirror of
https://github.com/gradio-app/gradio.git
synced 2025-04-12 12:40:29 +08:00
Use EventSource_factory
in open_stream()
for Wasm (#6820)
* Use `EventSource_factory` in `open_stream()` for Wasm * add changeset --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> Co-authored-by: Ali Abdalla <ali.si3luwa@gmail.com>
This commit is contained in:
parent
a5f3d2bef2
commit
649cd4d680
6
.changeset/short-clowns-deny.md
Normal file
6
.changeset/short-clowns-deny.md
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
"@gradio/client": minor
|
||||
"gradio": minor
|
||||
---
|
||||
|
||||
feat:Use `EventSource_factory` in `open_stream()` for Wasm
|
@ -1034,7 +1034,7 @@ export function api_factory(
|
||||
session_hash: session_hash
|
||||
}).toString();
|
||||
let url = new URL(`${config.root}/queue/data?${params}`);
|
||||
event_stream = new EventSource(url);
|
||||
event_stream = EventSource_factory(url);
|
||||
event_stream.onmessage = async function (event) {
|
||||
let _data = JSON.parse(event.data);
|
||||
const event_id = _data.event_id;
|
||||
|
Loading…
x
Reference in New Issue
Block a user