Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem: some errors on Debian + kFreeBSD #2196

Merged
merged 2 commits into from
Nov 5, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/stream_engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,12 @@ zmq::stream_engine_t::~stream_engine_t ()
wsa_assert (rc != SOCKET_ERROR);
#else
int rc = close (s);
#ifdef __FreeBSD_kernel__
// FreeBSD may return ECONNRESET on close() under load but this is not
// an error.
if (rc == -1 && errno == ECONNRESET)
rc = 0;
#endif
errno_assert (rc == 0);
#endif
s = retired_fd;
Expand Down
6 changes: 6 additions & 0 deletions src/thread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,12 @@ void zmq::thread_t::setSchedulingParameters(int priority_, int schedulingPolicy_
#endif

rc = pthread_setschedparam(descriptor, policy, &param);

#ifdef __FreeBSD_kernel__
// If this feature is unavailable at run-time, don't abort.
if(rc == ENOSYS) return;
#endif

posix_assert (rc);
#else

Expand Down