Skip to content

Commit

Permalink
Ensure custom timeout_length is passed through OpenTok::OpenTok to in…
Browse files Browse the repository at this point in the history
…stances of OpenTok::Client (#214)

Co-authored-by: Krzysztof Adamski <[email protected]>
  • Loading branch information
Ben Greenberg and rience authored Jun 26, 2020
1 parent dea2004 commit af4350d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/opentok/opentok.rb
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ def connections

protected
def client
@client ||= Client.new api_key, api_secret, api_url, ua_addendum
@client ||= Client.new api_key, api_secret, api_url, ua_addendum, timeout_length: @timeout_length
end

end
Expand Down
2 changes: 1 addition & 1 deletion lib/opentok/version.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module OpenTok
# @private
VERSION = '4.1.0'
VERSION = '4.1.1'
end
6 changes: 6 additions & 0 deletions spec/opentok/opentok_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,12 @@
it "should have an timeout_length property" do
expect(opentok.timeout_length).to eq timeout_length
end

it "should send the custom timeout_length to new instances of OpenTok::Client" do
streams = opentok.streams

expect(streams.instance_variable_get(:@client).timeout_length).to eq timeout_length
end
end

context "with an addendum to the user agent string" do
Expand Down

0 comments on commit af4350d

Please sign in to comment.