Skip to content

Commit

Permalink
Merge pull request #453 from mstreeter10/ulsp-fix
Browse files Browse the repository at this point in the history
ulsp: socket reading fix
  • Loading branch information
Jafaral authored May 3, 2024
2 parents 9cd4bbe + f93ba10 commit 4a74fb0
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions uni/ulsp/server.icn
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class Server(

repeat {
every request_body := get_request(sock) do {
jsontable := jtou(request_body)
jsontable := jtou(request_body) | next

request_method := jsontable["method"]
request_params := jsontable["params"]
Expand Down Expand Up @@ -87,9 +87,14 @@ class Server(
if pos(0) then {
request_body := ready(sock, len)
}
else
else {
request_body := move(len)
msg := tab(0)
}
until *request_body = len do {
(*select(sock, 5000) ~= 0) | break
request_body ||:= ready(sock, len)
}
msg := tab(0)
}
suspend request_body
}
Expand Down

0 comments on commit 4a74fb0

Please sign in to comment.