Skip to content

Commit ea8dae3

Browse files
authored
Update http_websocket.cr (#27)
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.
1 parent d399b82 commit ea8dae3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/opentelemetry/instrumentation/crystal/http_websocket.cr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ unless_disabled?("OTEL_CRYSTAL_DISABLE_INSTRUMENTATION_HTTP_WEBSOCKET") do
237237
{% if compare_versions(Crystal::VERSION, "1.5.2") < 0 %}
238238
span["close_code"] = close_code.to_s
239239
{% else %}
240-
span["close_code"] = close.to_s
240+
span["close_code"] = code.to_s
241241
{% end %}
242242
span["message"] = message.to_s
243243
previous_def

0 commit comments

Comments
 (0)