From bbc6dc3fccfcdffef65211dd4d1c4058ecef624b Mon Sep 17 00:00:00 2001 From: Patrick J Cherry Date: Mon, 18 Jul 2011 16:44:21 +0100 Subject: Improved code to avoid Exception when the processor attempts to freeze a thread that is not running. --- lib/mauve/processor.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/mauve/processor.rb') diff --git a/lib/mauve/processor.rb b/lib/mauve/processor.rb index 15987c2..e3aac54 100644 --- a/lib/mauve/processor.rb +++ b/lib/mauve/processor.rb @@ -36,7 +36,7 @@ module Mauve # break if data.nil? - Timer.instance.freeze unless Timer.instance.frozen? + Timer.instance.freeze if Timer.instance.alive? and !Timer.instance.frozen? logger.debug("Got #{data.inspect} from #{client.inspect}") -- cgit v1.2.1