Skip to content

Commit

Permalink
Ensure @gradio/client's submit iterator releases as expected (#8715)
Browse files Browse the repository at this point in the history
* close the iterator when the prediction stream completes

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
  • Loading branch information
pngwn and gradio-pr-bot committed Jul 11, 2024
1 parent 740364e commit a6b3c6c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .changeset/itchy-cities-walk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@gradio/client": patch
"gradio": patch
---

fix:Ensure `@gradio/client`'s `submit` iterator releases as expected
2 changes: 2 additions & 0 deletions client/js/src/utils/submit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -684,6 +684,8 @@ export function submit(
endpoint: _endpoint,
fn_index
});

close();
}
}

Expand Down

0 comments on commit a6b3c6c

Please sign in to comment.