Skip to content

Commit

Permalink
Ensure timeout is correctly passed into client options
Browse files Browse the repository at this point in the history
  • Loading branch information
zacksiri committed Dec 2, 2024
1 parent ab631d7 commit ff634e3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/lexdee/observer.ex
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,17 @@ defmodule Lexdee.Observer do
Keyword.get(opts, :url) ||
"wss://#{base_uri.host}:#{base_uri.port}/1.0/events?type=#{type}"

timeout = Keyword.get(options, :timeout, 30_000)
transport_opts =
options
|> Keyword.get(:transport_opts, [])
|> Keyword.put(:timeout, timeout)

options =
options
|> List.flatten()
|> Keyword.put(:protocols, [:http1])
|> Keyword.put(:transport_opts, transport_opts)

Process.send_after(self(), :check_connectivity, 15_000)

Expand Down

0 comments on commit ff634e3

Please sign in to comment.