Skip to content

Commit

Permalink
dont add deregister to root session! (#186)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonDanisch authored Oct 10, 2023
1 parent 631f44a commit c93ab58
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/HTTPServer/helper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@ function response_500(exception)
], body=body)
end

# TODO, can we n
# Base.convert(::Type{HTTP.Response}, s::Exception) = response_500(s)
# TODO, how to do this without pircay? THis happens inside HTTP, so we can't just use try & catch in our own code
# WIthout this overload, we'll get a `cant convert Exception to HTTP.Response` error, without seeing the error.
Base.convert(::Type{HTTP.Response}, s::Exception) = response_500(s)
3 changes: 2 additions & 1 deletion src/serialization/caching.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ function register_observable!(session::Session, obs::Observable)
# Only register one time
if !haskey(root.session_objects, obs.id)
updater = JSUpdateObservable(root, obs.id)
on(updater, root, obs)
deregister = on(updater, obs)
push!(session.deregister_callbacks, deregister)
end
return
end
Expand Down

0 comments on commit c93ab58

Please sign in to comment.