problem: for zmq radio/dish pattern, if the radio process restarts, the dish will not resend subscriptions to radio. And the result is that the dish will never receive any more messages.
solution: in session_base_t::reconnect (), take ZMQ_DISH into consideration when invoking hiccup method.
In function session_base_t::reconnect, if we set immediate to 1 and set linger, we will get into first block of reconnect function, and set pipe to NULL, but we forget to cancel timer of linger. Once timer tiggered, we will get coredump. Solution: cancel timer in the end of set pipe to NULL
Some #define switches cause the body of entire files to be omitted. This
causes a linker warning on Visual Studio 2017, for example
warning LNK4221: This object file does not define any previously
undefined public symbols, so it will not be used by any link
operation that consumes this library
Since this is warning us about something that shouldn't be
earth-shattering news, we add a linker flag to suppress this warning on
MSVC builds.
Solution: don't set thread name on Android
Setting a thread name on Android may fail with "permission
denied" error and abort the process due to failed assertion.
Tested on Android 5 and 6 (two phones).
Strangely enough, it only happens on signed APKs and is fine
in debug. Using JeroMQ is not an option as we need TCP keepalive
settings and authentication which JeroMQ doesn't support.
Solution: roll back the pipe if writing messages other than the
first fails in router::xsend. Roll it back also when the pipe is
terminating.
Also add test case that reproduces the memory leak when ran with
valgrind.
Fixes#2567
Solution: roll back the pipe if writing messages other than the
first fails in router::xsend.
Also add test case that reproduces the memory leak when ran with
valgrind.
Fixes#2567
Solution: use either a wildcard IPC, or where the codepath needs to
be tested a file named after the test, so that it is unique and there
is no clash on the filesystem, allowing parallel test runs.
Solution: use ZMQ_LAST_ENDPOINT in most places. This alllows running
tests in paralle, and on over-booked shared machines where many of
the ports would be already in use.
Keep 3 tests with an hardcoded port, as there are some code paths that
require it (eg: connect before bind), but list those ports in
tests/testutil.hpp as macros so that they do not overlap and still
allow parallel runs.
These changes were inspired by a patch uploaded to Ubuntu by the
package maintainer, Steve Langasek <steve.langasek@ubuntu.com>.
Thank you Steve!
Solution: add new tokens to .travis.yml and change ci_deploy.sh
script to use Github APIs to create a temporary branch at the tag,
and the OBS APIs to trigger a source service run in the stable and
draft release projects:
network:messaging:zeromq:release-stable
network:messaging:zeromq:release-draft
The branch hack is unfortunately necessary as it is not possible to
modify OBS sources with the token APIs, and it is also not possible
to automatically fetch the latest tag in the service files.
The temporary branch is immediately deleted.
Solution: a new option has been added to the tar_scm service, so use
it to set the version to last_tag+git<last commit date> which is more
useful.
Unfortunately it's not possible to set it to the current version as
set in the header files, as it's not possible to parse files, only
commit ids, dates and git tags. But it's a step forward.
Solution: do not define ZMQ_HAVE_POLLER in src/zmq_drafts.h otherwise
src/zmq.cpp will implement zmq_poll using the new poller classes.
Same for ZMQ_HAVE_TIMERS, even though it has no internal effect, but
to be safe against future development.