summaryrefslogtreecommitdiff
path: root/data/rbot
diff options
context:
space:
mode:
authorVoker57 <voker57@gmail.com>2009-12-19 18:47:43 +0300
committerVoker57 <voker57@gmail.com>2010-01-26 00:41:08 +0300
commit9409ec05af96d64cc05e72ea1657859237e0432e (patch)
treed4220cfd7117d7c6f3abf8f5f76e2b458b7d2791 /data/rbot
parent8730fade6a8285a747367deef652b20370dfe83b (diff)
markov: close registry correctly
Diffstat (limited to 'data/rbot')
-rwxr-xr-xdata/rbot/plugins/markov.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/data/rbot/plugins/markov.rb b/data/rbot/plugins/markov.rb
index c574fd4b..0b8412f7 100755
--- a/data/rbot/plugins/markov.rb
+++ b/data/rbot/plugins/markov.rb
@@ -253,9 +253,13 @@ class MarkovPlugin < Plugin
end
debug 'closing learning thread'
+ @learning_queue.clear
@learning_queue.push nil
@learning_thread.join
debug 'learning thread closed'
+ @chains.close
+ @rchains.close
+ super
end
# pick a word from the registry using the pair as key.