[nanomsg] [PATCH] Terminate astream if initializing usock failed

  • From: Nir Soffer <nirsof@xxxxxxxxx>
  • To: nanosmg list <nanomsg@xxxxxxxxxxxxx>
  • Date: Tue, 12 Mar 2013 00:52:56 +0200

When tuning an accepted usock, we see random setsockopt failures if the
connecting peer close the connection without sending anything. These
failures were not expected by the library and cause termination of the
process.

This patch change nn_usock_tune to fail with an error code instead of
asserting. When initializing an accepcted socket in nn_astream_init, we
terminate the astream if initialization failed.

Terminating the astream may not be correct - needs review.

With this patch, all errors in ipc_shutdown are gone on OS X.

License: MIT

Attachment: 0001-Terminate-astream-if-initializing-usock-failed.patch
Description: Binary data

Other related posts: