[nanomsg] Asserts

  • From: Boszormenyi Zoltan <zboszor@xxxxx>
  • To: nanomsg@xxxxxxxxxxxxx, Martin Sustrik <sustrik@xxxxxxxxxx>
  • Date: Mon, 06 Jan 2014 15:43:24 +0100

Hi,

I tried to test some things documented in the man pages,
like errors from nn_bind. So I intentionally used nn_bind()
on the same endpoint but I didn't get EADDRINUSE as
documented, I got a coredump instead.

This because nn_btcp_start_listening() in src/transports/tcp/btcp.c
uses errnum_assert() instead of passing the error upwards.

I guess this can still be attributed to the alpha state of the library.
I am not familiar with the internals of nanomsg (yet), but would
it be an easy solution to change the return value of the
*_start_listening() functions from void to int and pass the value of rc
if it's not 0? Or does this function run in a thread and nn_bind()
returned success in the meantime?

Thanks in advance,
Zoltán Böszörményi


Other related posts:

  • » [nanomsg] Asserts - Boszormenyi Zoltan