aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorToshiaki Asai <toshi.alternative@gmail.com>2016-10-02 23:51:49 +0900
committerToshiaki Asai <toshi.alternative@gmail.com>2016-10-02 23:51:49 +0900
commit0a51370a95a4f57c643bfd1db46ea2630b42d97d (patch)
tree745608eff78227100fdf07838ada120f738178a9
parent7a5fba42060655ee34f4dde80e3fea2a5c6106c4 (diff)
downloadmikutter-0a51370a95a4f57c643bfd1db46ea2630b42d97d.tar.gz
streaming: Net::ReadTimeoutの時にnoticeを発生させない
-rw-r--r--core/plugin/streaming/perma_streamer.rb2
-rw-r--r--core/plugin/streaming/streamer.rb4
2 files changed, 5 insertions, 1 deletions
diff --git a/core/plugin/streaming/perma_streamer.rb b/core/plugin/streaming/perma_streamer.rb
index 47e3f921..dad52db3 100644
--- a/core/plugin/streaming/perma_streamer.rb
+++ b/core/plugin/streaming/perma_streamer.rb
@@ -19,6 +19,8 @@ module ::Plugin::Streaming
@fail.success
}
result = streamer.thread.value
+ rescue Net::ReadTimeout => exception
+ @fail.notify(exception)
rescue Net::HTTPError => exception
warn "PermaStreamer caught exception"
warn exception
diff --git a/core/plugin/streaming/streamer.rb b/core/plugin/streaming/streamer.rb
index bd7a7caf..66836f46 100644
--- a/core/plugin/streaming/streamer.rb
+++ b/core/plugin/streaming/streamer.rb
@@ -50,9 +50,11 @@ module ::Plugin::Streaming
if q and not q.empty?
parsed = JSON.parse(q) rescue nil
event_factory parsed if parsed end }
+ rescue Net::ReadTimeout
+ raise
rescue => exception
error exception
- raise exception end
+ raise end
# UserStreamを終了する
def kill