Fix websocket interruption (#291)

* Code

* Fix

* add code

* interruptions

* Add code

* code

* Add code

* Add code

* code
This commit is contained in:
Freddy Boulton
2025-04-22 14:40:19 -04:00
committed by GitHub
parent a68023101d
commit 074e9c9345
9 changed files with 287 additions and 21 deletions

View File

@@ -928,6 +928,7 @@ class Stream(WebRTCConnectionMixin):
json={"url": host},
headers={"Authorization": token or get_token() or ""},
)
r.raise_for_status()
except Exception:
URL = "https://fastrtc-fastphone.hf.space"
r = httpx.post(
@@ -936,6 +937,14 @@ class Stream(WebRTCConnectionMixin):
headers={"Authorization": token or get_token() or ""},
)
r.raise_for_status()
if r.status_code == 202:
print(
click.style("INFO", fg="orange")
+ ":\t You have "
+ "run out of your quota"
)
return
data = r.json()
code = f"{data['code']}"
phone_number = data["phone"]