Skip to content

Commit

Permalink
Fix #3162
Browse files Browse the repository at this point in the history
  • Loading branch information
ilue authored Jun 12, 2018
1 parent 3a1e8f0 commit e22cd67
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/thread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ void zmq::thread_t::
return;
}
#endif
int rc = pthread_getschedparam (_descriptor, &policy, &param);
int rc = pthread_getschedparam (pthread_self (), &policy, &param);
posix_assert (rc);

if (_thread_sched_policy != ZMQ_THREAD_SCHED_POLICY_DFLT) {
Expand Down Expand Up @@ -257,7 +257,7 @@ void zmq::thread_t::
param.sched_priority = -1;
#endif

rc = pthread_setschedparam (_descriptor, policy, &param);
rc = pthread_setschedparam (pthread_self (), policy, &param);

#if defined(__FreeBSD_kernel__) || defined(__FreeBSD__)
// If this feature is unavailable at run-time, don't abort.
Expand Down

0 comments on commit e22cd67

Please sign in to comment.