Skip to content

Commit

Permalink
fix error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
okdshin committed Dec 4, 2023
1 parent 9fd4ed9 commit eb33b9b
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions flatline_lsp.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,14 @@ def __init__(
stderr=subprocess.DEVNULL,
)
while True:
res = requests.get(
f"http://{self.backend_server_host}:{self.backend_server_port}"
)
if res.status_code == 200:
break
try:
res = requests.get(
f"http://{self.backend_server_host}:{self.backend_server_port}"
)
if res.status_code == 200:
break
except Exception:
pass
time.sleep(1)

@property
Expand Down

0 comments on commit eb33b9b

Please sign in to comment.