aboutsummaryrefslogtreecommitdiff
path: root/lib/mauve/processor.rb
diff options
context:
space:
mode:
authorPatrick J Cherry <patrick@bytemark.co.uk>2011-08-17 11:08:07 +0100
committerPatrick J Cherry <patrick@bytemark.co.uk>2011-08-17 11:08:07 +0100
commit8c8e5ae926e0009743fe92dccb588783640a6022 (patch)
treee23eea583beac0caf5fb3e45a33b4d2ac7796abf /lib/mauve/processor.rb
parent79dcf16ec6d229d6c31e055ed8e6a98327526a3a (diff)
* Reminder notifications now take the same path to notify as initial alerts
* Threading tidied -- processor will not do anything unless the timer has frozen * Person#send_alert now tidied and merged with alert_changed * POP3 server only shows alerts relevant to the user * Server now defaults to using an in-memory SQLite database (good for testing) * Server initializes a blank mauve config. * Tests tidied up
Diffstat (limited to 'lib/mauve/processor.rb')
-rw-r--r--lib/mauve/processor.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/mauve/processor.rb b/lib/mauve/processor.rb
index 86ed5dd..d68c551 100644
--- a/lib/mauve/processor.rb
+++ b/lib/mauve/processor.rb
@@ -34,6 +34,13 @@ module Mauve
sz = Server.packet_buffer_size
sz.times do
+ Timer.instance.freeze if Timer.instance.alive? and !Timer.instance.frozen?
+
+ #
+ # Hmm.. timer not frozen.
+ #
+ break unless Timer.instance.frozen?
+
data, client, received_at = Server.packet_pop
#
@@ -41,7 +48,6 @@ module Mauve
#
break if data.nil?
- Timer.instance.freeze if Timer.instance.alive? and !Timer.instance.frozen?
# logger.debug("Got #{data.inspect} from #{client.inspect}")