lib/logstash/inputs/imap.rb in logstash-input-imap-1.0.0 vs lib/logstash/inputs/imap.rb in logstash-input-imap-2.0.0

- old
+ new

@@ -61,10 +61,11 @@ imap.login(@user, @password.value) return imap end def run(queue) + @run_thread = Thread.current Stud.interval(@check_interval) do check_mail(queue) end end @@ -141,13 +142,13 @@ event end end # def handle public - def teardown + def stop + Stud.stop!(@run_thread) $stdin.close - finished - end # def teardown + end private # transcode_to_utf8 is meant for headers transcoding. # the mail gem will set the correct encoding on header strings decoding