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

nng_socket_close may hang on windows #2102

Open
Red-Li opened this issue Feb 14, 2025 · 0 comments
Open

nng_socket_close may hang on windows #2102

Red-Li opened this issue Feb 14, 2025 · 0 comments

Comments

@Red-Li
Copy link

Red-Li commented Feb 14, 2025

Describe the bug
nng_socket_close may hang on window in some situations, from the call stack, it is waiting for pipe close.

while (!nni_list_empty(&sock->s_pipes)) {

Expected behavior
It should return normally

Actual Behavior
Hang

To Reproduce
Possible reproduce senario:
Create IPC/pair socket, but don't send any data for a period large than 5 seconds, and then close the socket.

** Environment Details **

  • NNG Version: latest(v2.0)
  • Windows 10
  • Visual Studio 2022
  • Static

Additional context
from my debugging, there is a issue in IOCP worker, timeout error does not handle correctly, which cause it exit unexpected.

if (olpd == NULL) {

Potential Fix has attached

winio.patch

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

No branches or pull requests

1 participant