Skip to content

Commit 5605ecf

Browse files
committed
Allow repeate close calls
1 parent fa52992 commit 5605ecf

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/core.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,8 @@ function send_error_response(endpoint, original_request, code, message, data)
251251
end
252252

253253
function Base.close(endpoint::JSONRPCEndpoint)
254+
endpoint.status == :closed && return
255+
254256
flush(endpoint)
255257

256258
endpoint.status = :closed

0 commit comments

Comments
 (0)