Skip to content
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

Deal with empty Identity for ROUTER socket #140

Merged
merged 1 commit into from
Apr 11, 2023

Conversation

superfashi
Copy link
Contributor

By default, libzmq implementation sends empty Identity. Also in libzmq implementation, when a server receives an empty Identity for Router connections, it falls back to auto generation. Otherwise, the Router socket will by large chance misbehave.

See: https://github.com/zeromq/libzmq/blob/master/src/router.cpp#L481-L487

Additionally, remove sck.ids, which is unused and leaks *Conn.

…, need to assign a uuid in those case

additionally, remove sck.ids, which seems to be leaking and unused
@codecov
Copy link

codecov bot commented Apr 7, 2023

Codecov Report

Patch coverage: 50.00% and project coverage change: -0.37 ⚠️

Comparison is base (2ae9328) 67.43% compared to head (9381545) 67.06%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #140      +/-   ##
==========================================
- Coverage   67.43%   67.06%   -0.37%     
==========================================
  Files          29       29              
  Lines        1821     1819       -2     
==========================================
- Hits         1228     1220       -8     
- Misses        490      495       +5     
- Partials      103      104       +1     
Impacted Files Coverage Δ
socket.go 82.35% <50.00%> (-1.37%) ⬇️

... and 2 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@sbinet sbinet left a comment

Choose a reason for hiding this comment

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

LGTM.

could you send a PR against go-zeromq/license and add yourself to the AUTHORS and/or CONTRIBUTORS files ?
then I'll merge this PR.

thanks.

@sbinet sbinet merged commit 72ac04f into go-zeromq:main Apr 11, 2023
@sbinet
Copy link
Contributor

sbinet commented Apr 11, 2023

needed go-zeromq/license#15

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.

3 participants