lib/roku_builder/plugins/monitor.rb in roku_builder-4.2.1 vs lib/roku_builder/plugins/monitor.rb in roku_builder-4.2.2
- old
+ new
@@ -112,9 +112,10 @@
# @param all_text [String] remaining partial line text
# @param txt [String] current string from telnet
# @param regexp [Regexp] regular expression to filter text on
# @return [String] remaining partial line text
def manage_text(all_text:, txt:, regexp: nil)
+ raise ExecutionError, "Connection Closed" unless txt
if /connection is already in use/ =~ txt
raise ExecutionError, "Connection is in use"
end
all_text += txt
while line = all_text.slice!(/^.*\n/) do