Skip to content

Commit

Permalink
Fix rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
ziopio committed Jan 26, 2024
1 parent 5a4cb4f commit 1b6d77d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/grisp_io_connection.erl
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,15 @@ handle_event(enter, _OldState, connecting, _Data) ->
{ok, Domain} = application:get_env(grisp_seawater, seawater_domain),
{ok, Port} = application:get_env(grisp_seawater, seawater_port),
?LOG_NOTICE(#{event => connecting, domain => Domain, port => Port}),
grisp_seawater_ws:connect(Domain, Port),
{keep_state_and_data, [{state_timeout, 0, retry}]};
handle_event(state_timeout, retry, connecting, Data) ->
case grisp_seawater_client:connect() of
ok ->
case grisp_seawater_ws:is_connected() of
true ->
?LOG_NOTICE(#{event => connected}),
{next_state, connected, Data};
Error ->
?LOG_ERROR(#{event => connection_failed,
reason => Error}),
false ->
?LOG_NOTICE(#{event => waiting_ws_connection}),
{keep_state_and_data, [{state_timeout, ?STD_TIMEOUT, retry}]}
end;

Expand Down
2 changes: 1 addition & 1 deletion src/grisp_seawater.app.src
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
{seawater_port, 7777},
{connect, true}, % keeps a constant connection with grisp.io
{ntp, false}, % if set to true, starts the NTP client
{ws_requests_timeout, 5_000},
{ws_requests_timeout, 5_000}
]},
{modules, []},
{links, []}
Expand Down

0 comments on commit 1b6d77d

Please sign in to comment.