+1

On Tue, Aug 31, 2010 at 4:16 PM, Rein Henrichs <[email protected]> wrote:

> 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]<puppet-dev%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/puppet-dev?hl=en.
>
>


-- 
-----------------------------------------------------------
The power of accurate observation is
commonly called cynicism by those
who have not got it.  ~George Bernard Shaw
------------------------------------------------------------

-- 
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.

Reply via email to