X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fpool%2Frequest.ex;h=3fb930db72fbb51d4d7fcac9011b64b4efa03c29;hb=b87b798ca1660224a3192c32b035c19b18e11587;hp=cce30959950b95db90be2aa367ef61846301dcc4;hpb=d9c5ae7c09c7cbf3f4f66e01b7ed69a3d6388916;p=akkoma diff --git a/lib/pleroma/pool/request.ex b/lib/pleroma/pool/request.ex index cce309599..3fb930db7 100644 --- a/lib/pleroma/pool/request.ex +++ b/lib/pleroma/pool/request.ex @@ -22,18 +22,13 @@ defmodule Pleroma.Pool.Request do @impl true def handle_call({:execute, client, request}, _from, state) do - response = Pleroma.HTTP.request_try(client, request) + response = Pleroma.HTTP.request(client, request) {:reply, response, state} end @impl true - def handle_info({:gun_data, _conn, stream, _, _}, state) do - # in some cases if we reuse conn and got {:error, :body_too_large} - # gun continues to send messages to this process, - # so we flush messages for this request - :ok = :gun.flush(stream) - + def handle_info({:gun_data, _conn, _stream, _, _}, state) do {:noreply, state} end @@ -44,13 +39,11 @@ defmodule Pleroma.Pool.Request do @impl true def handle_info({:gun_down, _conn, _protocol, _reason, _killed}, state) do - # don't flush messages here, because gun can reconnect {:noreply, state} end @impl true - def handle_info({:gun_error, _conn, stream, _error}, state) do - :ok = :gun.flush(stream) + def handle_info({:gun_error, _conn, _stream, _error}, state) do {:noreply, state} end