From acab96304f6bb3c32617411165fe010c4af9011a Mon Sep 17 00:00:00 2001 From: ilue Date: Tue, 12 Jun 2018 11:10:03 +0800 Subject: [PATCH] Fix #3162 --- src/thread.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/thread.cpp b/src/thread.cpp index e100556a52..84473dca92 100644 --- a/src/thread.cpp +++ b/src/thread.cpp @@ -228,7 +228,7 @@ void zmq::thread_t:: return; } #endif - int rc = pthread_getschedparam (_descriptor, &policy, ¶m); + int rc = pthread_getschedparam (pthread_self (), &policy, ¶m); posix_assert (rc); if (_thread_sched_policy != ZMQ_THREAD_SCHED_POLICY_DFLT) { @@ -257,7 +257,7 @@ void zmq::thread_t:: param.sched_priority = -1; #endif - rc = pthread_setschedparam (_descriptor, policy, ¶m); + rc = pthread_setschedparam (pthread_self (), policy, ¶m); #if defined(__FreeBSD_kernel__) || defined(__FreeBSD__) // If this feature is unavailable at run-time, don't abort.