Skip to content

Add a send timeout to nnpy sockets.#183

Merged
antoninbas merged 4 commits intop4lang:mainfrom
fruffy:patch-1
Jun 13, 2023
Merged

Add a send timeout to nnpy sockets.#183
antoninbas merged 4 commits intop4lang:mainfrom
fruffy:patch-1

Conversation

@fruffy
Copy link
Copy Markdown
Contributor

@fruffy fruffy commented Jun 10, 2023

If the nanomsg peer has crashed or is otherwise non-functional, nanomsg will block indefinitely on send. This PR adds a socket option with a (conservative) timeout.

Fixes #178.

Copy link
Copy Markdown
Member

@antoninbas antoninbas left a comment

Choose a reason for hiding this comment

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

I haven't tested this, but the change LGTM

@antoninbas antoninbas merged commit 9775e55 into p4lang:main Jun 13, 2023
@fruffy fruffy deleted the patch-1 branch June 13, 2023 19:56
@fruffy
Copy link
Copy Markdown
Contributor Author

fruffy commented Jun 13, 2023

Thanks! Possible to also push a new version of the pypi package? Then I can use it in the corresponding p4c PR.

@antoninbas
Copy link
Copy Markdown
Member

Thanks! Possible to also push a new version of the pypi package? Then I can use it in the corresponding p4c PR.

Done

@fruffy
Copy link
Copy Markdown
Contributor Author

fruffy commented Jun 14, 2023

Thanks! Possible to also push a new version of the pypi package? Then I can use it in the corresponding p4c PR.

Done

Great, thanks for the quick update.

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.

PI nanomsg hangs if the corresponding switch crashes

2 participants