mirror of
https://github.com/gradio-app/gradio.git
synced 2025-03-13 11:57:29 +08:00
Fix heartbeat in the js client to be Lite compatible (#7974)
* Fix heartbeat in the js client to be Lite compatible * add changeset * add changeset * Stop assigning the EventSource instance to a variable at heartbeat --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
This commit is contained in:
parent
5f0248e797
commit
79e0aa81c9
6
.changeset/eighty-rockets-march.md
Normal file
6
.changeset/eighty-rockets-march.md
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
"@gradio/client": patch
|
||||
"gradio": patch
|
||||
---
|
||||
|
||||
fix:Fix heartbeat in the js client to be Lite compatible
|
@ -360,9 +360,10 @@ export function api_factory(
|
||||
|
||||
const _config = await config_success(config);
|
||||
// connect to the heartbeat endpoint via GET request
|
||||
const heartbeat = new EventSource(
|
||||
const heartbeat_url = new URL(
|
||||
`${config.root}/heartbeat/${session_hash}`
|
||||
);
|
||||
EventSource_factory(heartbeat_url); // Just connect to the endpoint without parsing the response. Ref: https://github.com/gradio-app/gradio/pull/7974#discussion_r1557717540
|
||||
res(_config);
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
|
Loading…
x
Reference in New Issue
Block a user