Skip to content

Conversation

@yordis
Copy link
Contributor

@yordis yordis commented Jan 3, 2026

Signed-off-by: Yordis Prieto yordis.prieto@gmail.com

Copy link

@orca-security-us orca-security-us bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Infrastructure as Code high 0   medium 0   low 0   info 0 View in Orca
Passed Passed OSS Licenses high 0   medium 0   low 0   info 0 View in Orca
Passed Passed SAST high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Vulnerabilities high 0   medium 0   low 0   info 0 View in Orca

@yordis yordis marked this pull request as ready for review January 3, 2026 11:54
@yordis
Copy link
Contributor Author

yordis commented Jan 3, 2026

@guisehn would this work to close the issue? Any idea on how to properly test this 😭

Comment on lines +257 to +266
if state.channel do
state.on_disconnect.()
state.channel.adapter.disconnect(state.channel)

:telemetry.execute(
[:conn_grpc, :channel, :disconnected],
%{duration: now - state.connection_start},
telemetry_metadata(state)
)
end
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if I am correct here to check for nil and trigger the telemetry when it actually happens.

While also, if that is the case that I need to check nil should I still call state.on_disconnect.() regardless of nil channel or not?

Copy link
Contributor

@guisehn guisehn Jan 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's fine not to do anything when channel is nil.

fixes TheRealReal#22

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Copy link
Contributor

@guisehn guisehn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution! 😄

@guisehn guisehn merged commit cf34012 into TheRealReal:main Jan 5, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants