Skip to content

api: fix panic in conn.NewWatcher() #439

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

ImeevMA
Copy link

@ImeevMA ImeevMA commented Mar 28, 2025

Before this patch, conn.c was not checked for nil before calling its method. This could cause a panic if the connection was lost or closed.

Closes #438

What has been done? Why? What problem is being solved?

I didn't forget about (remove if it is not applicable):

Related issues: #438

@ImeevMA ImeevMA force-pushed the imeevma/gh-438-fix-panic-new-watcher-during-reconnect branch from 3ea3046 to a6a4988 Compare March 28, 2025 15:07
@bigbes bigbes marked this pull request as draft June 24, 2025 13:43
@bigbes bigbes marked this pull request as draft June 24, 2025 13:43
@bigbes bigbes force-pushed the imeevma/gh-438-fix-panic-new-watcher-during-reconnect branch from 20a9615 to f4aa3d5 Compare June 24, 2025 13:52
@bigbes bigbes force-pushed the imeevma/gh-438-fix-panic-new-watcher-during-reconnect branch 2 times, most recently from 72da2b9 to 86a3a66 Compare June 27, 2025 09:05
@bigbes bigbes requested review from oleg-jukovec and dmyger June 27, 2025 09:27
@bigbes bigbes marked this pull request as ready for review June 27, 2025 09:27
@bigbes bigbes force-pushed the imeevma/gh-438-fix-panic-new-watcher-during-reconnect branch 2 times, most recently from c0bc42a to 8e181d6 Compare June 27, 2025 10:26
Copy link
Collaborator

@oleg-jukovec oleg-jukovec left a comment

Choose a reason for hiding this comment

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

Tests are red.

Before this patch, `conn.c` was not checked for `nil` before calling its
method. This could cause a panic if the connection was lost or closed.

Closes #438
@bigbes bigbes force-pushed the imeevma/gh-438-fix-panic-new-watcher-during-reconnect branch from 8e181d6 to 85aeec8 Compare June 27, 2025 11:36
@bigbes bigbes requested a review from oleg-jukovec June 27, 2025 11:45
@oleg-jukovec oleg-jukovec requested review from patapenka-alexey and removed request for dmyger June 27, 2025 12:26
@oleg-jukovec oleg-jukovec merged commit 20494e9 into master Jun 27, 2025
26 checks passed
@oleg-jukovec oleg-jukovec deleted the imeevma/gh-438-fix-panic-new-watcher-during-reconnect branch June 27, 2025 12:54
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.

Panic on NewWatcher() during reconnect
3 participants