Skip to content
This repository has been archived by the owner on Jan 9, 2018. It is now read-only.

Commit

Permalink
Merge pull request #3 from halorgium/poll-sleep
Browse files Browse the repository at this point in the history
Only iterate over the poller if a poll has been run
  • Loading branch information
Chuck Remes committed Nov 1, 2011
2 parents afd255c + eb5a9f3 commit e382367
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/zm/reactor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -518,11 +518,11 @@ def poll
sleep(@poll_interval / 1000.0)
else
rc = @poller.poll @poll_interval
end

if ZMQ::Util.resultcode_ok?(rc)
@poller.readables.each { |sock| @raw_to_socket[sock].resume_read }
@poller.writables.each { |sock| @raw_to_socket[sock].resume_write }
if ZMQ::Util.resultcode_ok?(rc)
@poller.readables.each { |sock| @raw_to_socket[sock].resume_read }
@poller.writables.each { |sock| @raw_to_socket[sock].resume_write }
end
end

rc
Expand Down

0 comments on commit e382367

Please sign in to comment.