Skip to content

Commit

Permalink
Update http_websocket.cr (#27)
Browse files Browse the repository at this point in the history
call to `close` is causing an infinite loop. `close_code` in Crystal version higher than `1.5.2` is called `code`. This PR fixes this infinite recursion issue.
  • Loading branch information
naqvis authored May 10, 2023
1 parent d399b82 commit ea8dae3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ unless_disabled?("OTEL_CRYSTAL_DISABLE_INSTRUMENTATION_HTTP_WEBSOCKET") do
{% if compare_versions(Crystal::VERSION, "1.5.2") < 0 %}
span["close_code"] = close_code.to_s
{% else %}
span["close_code"] = close.to_s
span["close_code"] = code.to_s
{% end %}
span["message"] = message.to_s
previous_def
Expand Down

0 comments on commit ea8dae3

Please sign in to comment.