]> git.cworth.org Git - sup/commitdiff
automatically connect to all sources at once upon startup
authorwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Wed, 24 Jan 2007 19:15:50 +0000 (19:15 +0000)
committerwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Wed, 24 Jan 2007 19:15:50 +0000 (19:15 +0000)
git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@279 5c8cc53c-5e98-4d25-b20a-d8db53a31250

bin/sup

diff --git a/bin/sup b/bin/sup
index a45f2b59858dad41b22c74272753183ba4a1ec85..2038fbdf1d656aee4e68314ad060b0dd795de5ba 100644 (file)
--- a/bin/sup
+++ b/bin/sup
@@ -102,7 +102,17 @@ begin
   Logger.make_buf
 
   bm.draw_screen
-  imode.load_threads :num => ibuf.content_height, :when_done => lambda {   reporting_thread { sleep 1; PollManager.poll } }
+  Index.usual_sources.each do |s|
+    reporting_thread do
+      begin
+        s.connect
+      rescue SourceError => e
+        Redwood::log "Fatal error loading from #{s}: #{e.message}"
+      end
+    end if s.respond_to? :connect
+  end
+
+  imode.load_threads :num => ibuf.content_height, :when_done => lambda { reporting_thread { sleep 1; PollManager.poll } }
 
   PollManager.start_thread