Mutex#synchronize is not reentrant. This will cause failures if the listening? method is called from within #listen or #unlisten or anywhere else the @mutex is currently locked.
Also, the synchronize block is not necessary to ensure consistency. Signed-off-by: Rein Henrichs <[email protected]> --- lib/puppet/network/http/webrick.rb | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/lib/puppet/network/http/webrick.rb b/lib/puppet/network/http/webrick.rb index 8ed0b28..9a88b86 100644 --- a/lib/puppet/network/http/webrick.rb +++ b/lib/puppet/network/http/webrick.rb @@ -60,9 +60,7 @@ class Puppet::Network::HTTP::WEBrick end def listening? - @mutex.synchronize do - @listening - end + @listening end # Configure our http log file. -- 1.7.0.4 -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.
