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

Fix PAIR v0 not finalizing the pollables when closing socket #1640

Merged
merged 1 commit into from
Feb 5, 2023

Conversation

jimenezrick
Copy link
Contributor

@jimenezrick jimenezrick commented Jan 30, 2023

This function needs to be pretty much identical between PAIR v0 and v1, it was missing just the call to release the pollable resources.

I was testing the compat API and i discovered that when using PAIR v0, it was leaking file descriptors because of this. This solves the problem completely mirroring the same logic present in PAIR v1 (https://github.com/nanomsg/nng/blob/master/src/sp/protocol/pair1/pair.c#L79-L80).

This function needs to be pretty much identical between PAIR v0 and
v1, it was missing just the call to release the pollable resources.
@gdamore
Copy link
Contributor

gdamore commented Feb 5, 2023

Thanks for the fix!

@gdamore
Copy link
Contributor

gdamore commented Feb 5, 2023

The leaks in the test suites are unrelated to this.

@gdamore gdamore merged commit 4578013 into nanomsg:master Feb 5, 2023
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.

None yet

2 participants