Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Trying to find a simple way to get all channels to close...

  • Loading branch information...
commit ba505258fd9ffd728d6fbc80653acab7fc00b37a 1 parent 330ff36
Darrick Wiebe authored
Showing with 5 additions and 0 deletions.
  1. +5 −0 lib/pacer/pipes/channel_pipe.rb
View
5 lib/pacer/pipes/channel_pipe.rb
@@ -9,6 +9,11 @@ def initialize(channel, timeout = nil)
value = channel.receive
if channel == value
channel.close rescue nil
+ if channel.receive?
+ channel << value
+ else
+ channel.close rescue nil
+ end
raise StopIteration
else
value
Please sign in to comment.
Something went wrong with that request. Please try again.