Skip to content

Commit

Permalink
Fixed an endless sleep in DBus::Main.run (bnc#537401).
Browse files Browse the repository at this point in the history
It ignored DBus::Connection.@buffer and called select on the
drained socket.
  • Loading branch information
mvidner committed Sep 9, 2009
1 parent e091e48 commit 2fca326
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/dbus/bus.rb
Original file line number Diff line number Diff line change
Expand Up @@ -681,6 +681,13 @@ def quit

# Run the main loop. This is a blocking call!
def run
# before blocking, empty the buffers
# https://bugzilla.novell.com/show_bug.cgi?id=537401
@buses.each_value do |b|
while m = b.pop_message
b.process(m)
end
end
while not @quitting and not @buses.empty?
ready, dum, dum = IO.select(@buses.keys)
ready.each do |socket|
Expand Down

0 comments on commit 2fca326

Please sign in to comment.