File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -106,6 +106,8 @@ function Base.run(x::JSONRPCEndpoint)
106
106
else
107
107
Base. display_error (stderr , err, bt)
108
108
end
109
+ finally
110
+ close (x. out_msg_queue)
109
111
end
110
112
111
113
x. read_task = @async try
@@ -143,6 +145,8 @@ function Base.run(x::JSONRPCEndpoint)
143
145
else
144
146
Base. display_error (stderr , err, bt)
145
147
end
148
+ finally
149
+ close (x. in_msg_queue)
146
150
end
147
151
148
152
x. status = :running
@@ -233,8 +237,8 @@ function Base.close(endpoint::JSONRPCEndpoint)
233
237
flush (endpoint)
234
238
235
239
endpoint. status = :closed
236
- close (endpoint. in_msg_queue)
237
- close (endpoint. out_msg_queue)
240
+ isopen (endpoint . in_msg_queue) && close (endpoint. in_msg_queue)
241
+ isopen (endpoint . out_msg_queue) && close (endpoint. out_msg_queue)
238
242
239
243
fetch (endpoint. write_task)
240
244
# TODO we would also like to close the read Task
You can’t perform that action at this time.
0 commit comments