mirror of
https://github.com/gradio-app/gradio.git
synced 2024-12-27 02:30:17 +08:00
fixed exit
This commit is contained in:
parent
68384d0661
commit
a6b1959e10
@ -442,8 +442,6 @@ class Interface:
|
|||||||
|
|
||||||
def block_thread(
|
def block_thread(
|
||||||
self,
|
self,
|
||||||
thread: threading.Thread,
|
|
||||||
path_to_local_server: str
|
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Block main thread until interrupted by user."""
|
"""Block main thread until interrupted by user."""
|
||||||
try:
|
try:
|
||||||
@ -452,8 +450,6 @@ class Interface:
|
|||||||
except (KeyboardInterrupt, OSError):
|
except (KeyboardInterrupt, OSError):
|
||||||
print("Keyboard interruption in main thread... closing server.")
|
print("Keyboard interruption in main thread... closing server.")
|
||||||
self.server.close()
|
self.server.close()
|
||||||
# Hit the server one more time to close it
|
|
||||||
networking.url_ok(self.local_url)
|
|
||||||
if self.enable_queue:
|
if self.enable_queue:
|
||||||
queueing.close()
|
queueing.close()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user