summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Makefile.am6
-rw-r--r--src/tcp_socket.cpp2
-rw-r--r--src/zmq_connecter_init.cpp1
-rw-r--r--src/zmq_engine.cpp7
-rw-r--r--src/zmq_listener_init.cpp3
5 files changed, 10 insertions, 9 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 1dac30d..88a6f4b 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,5 +1,9 @@
lib_LTLIBRARIES = libzmq.la
+pkginclude_HEADERS = \
+ ../include/zmq.h \
+ ../include/zmq.hpp
+
libzmq_la_SOURCES = \
app_thread.hpp \
atomic_bitmap.hpp \
@@ -29,7 +33,7 @@ libzmq_la_SOURCES = \
mutex.hpp \
object.hpp \
options.hpp \
- owner.hpp \
+ owned.hpp \
pipe.hpp \
platform.hpp \
poll.hpp \
diff --git a/src/tcp_socket.cpp b/src/tcp_socket.cpp
index 1eb338f..4472fa6 100644
--- a/src/tcp_socket.cpp
+++ b/src/tcp_socket.cpp
@@ -81,7 +81,7 @@ int zmq::tcp_socket_t::write (const void *data, int size)
return 0;
// Signalise peer failure.
- if (nbytes == -1 && errno == ECONNRESET)
+ if (nbytes == -1 && (errno == ECONNRESET || errno == EPIPE))
return -1;
errno_assert (nbytes != -1);
diff --git a/src/zmq_connecter_init.cpp b/src/zmq_connecter_init.cpp
index 7326ebe..4e996d8 100644
--- a/src/zmq_connecter_init.cpp
+++ b/src/zmq_connecter_init.cpp
@@ -77,7 +77,6 @@ bool zmq::zmq_connecter_init_t::write (::zmq_msg_t *msg_)
void zmq::zmq_connecter_init_t::flush ()
{
// We are not expecting any messages. No point in flushing.
- zmq_assert (false);
}
void zmq::zmq_connecter_init_t::detach ()
diff --git a/src/zmq_engine.cpp b/src/zmq_engine.cpp
index f12fe1a..298dd57 100644
--- a/src/zmq_engine.cpp
+++ b/src/zmq_engine.cpp
@@ -97,11 +97,8 @@ void zmq::zmq_engine_t::in_event ()
if (inpos < insize)
reset_pollin (handle);
- // If at least one byte was processed, flush all messages the decoder
- // may have produced.
- if (nbytes > 0)
- inout->flush ();
-
+ // Flush all messages the decoder may have produced.
+ inout->flush ();
}
void zmq::zmq_engine_t::out_event ()
diff --git a/src/zmq_listener_init.cpp b/src/zmq_listener_init.cpp
index c188030..5d2dc2e 100644
--- a/src/zmq_listener_init.cpp
+++ b/src/zmq_listener_init.cpp
@@ -62,7 +62,8 @@ bool zmq::zmq_listener_init_t::write (::zmq_msg_t *msg_)
void zmq::zmq_listener_init_t::flush ()
{
- zmq_assert (has_peer_identity);
+ if (!has_peer_identity)
+ return;
// Initialisation is done. Disconnect the engine from the init object.
engine->unplug ();