Skip to content

Commit

Permalink
Close channels when dune disconnects
Browse files Browse the repository at this point in the history
Signed-off-by: Rudi Grinberg <[email protected]>
  • Loading branch information
rgrinberg committed Jun 29, 2021
1 parent c88be05 commit ebc0905
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion ocaml-lsp-server/src/dune.ml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ end = struct
let+ (_ : Unix.process_status) = Scheduler.wait_for_process t.pid in
Scheduler.stop t.in_thread;
Scheduler.stop t.out_thread;
()
close_out_noerr t.out_chan;
close_in_noerr t.in_chan
end

module Client =
Expand Down
4 changes: 2 additions & 2 deletions ocaml-lsp-server/src/progress.ml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
open Import

type enabled =
(* TODO this needs to be mutexed *)
{ mutable token : ProgressToken.t option
{ (* TODO this needs to be mutexed *)
mutable token : ProgressToken.t option
; mutable build_counter : int
; report_progress :
Server_notification.Progress.t ProgressParams.t -> unit Fiber.t
Expand Down

0 comments on commit ebc0905

Please sign in to comment.