Skip to content

Commit e4bf6c1

Browse files
mk-fgprogval
authored andcommitted
poller.poll_one: handle and retry on clean connection-closed events
1 parent 3414da7 commit e4bf6c1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/matrix_client/poller.ex

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@ defmodule M51.MatrixClient.Poller do
8383
{:error, code, _} when code >= 500 and code < 600 ->
8484
# server error, try again
8585
poll_one(sup_pid, since, raw_client)
86+
87+
{:error, nil, :closed} ->
88+
# server closed connection, likely due to timeout, retry
89+
poll_one(sup_pid, since, raw_client)
8690
end
8791
end
8892

0 commit comments

Comments
 (0)