We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 591b9a3 commit 56dfb9bCopy full SHA for 56dfb9b
lib/kubeclient/watch_stream.rb
@@ -28,6 +28,14 @@ def each
28
yield @formatter.call(line.chomp)
29
end
30
31
+ # We get to this point if apiserver closed the socket.
32
+ # The connection can also be aborted by network issues / middleboxes,
33
+ # which can cause ConnectionError (https://github.com/httprb/http/issues/556).
34
+ # The exact cause doesn't matter to caller, bottom line is "infinite" watch finished.
35
+ # TODO: attempt resuming (https://github.com/abonas/kubeclient/pull/273).
36
+ rescue HTTP::ConnectionError
37
+ return
38
+ # .finish closing the socket underneath us can cause a wide range of exceptions...
39
rescue StandardError
40
raise unless @finished
41
0 commit comments