diff --git a/lib/bandit/http1/socket.ex b/lib/bandit/http1/socket.ex index 9157aade..3a5996ad 100644 --- a/lib/bandit/http1/socket.ex +++ b/lib/bandit/http1/socket.ex @@ -284,7 +284,6 @@ defmodule Bandit.HTTP1.Socket do defp read_available_for_header!(socket) do case ThousandIsland.Socket.recv(socket, 0) do {:ok, chunk} -> chunk - {:error, :timeout} -> request_error!("Header read timeout", :request_timeout) {:error, reason} -> socket_error!(reason) end end diff --git a/test/bandit/http1/plug_test.exs b/test/bandit/http1/plug_test.exs index 6f9c6110..721de7ab 100644 --- a/test/bandit/http1/plug_test.exs +++ b/test/bandit/http1/plug_test.exs @@ -652,7 +652,7 @@ defmodule HTTP1PlugTest do plug: {__MODULE__, []}, connection_telemetry_span_context: reference(), telemetry_span_context: reference(), - error: "Header read timeout" + error: "Unrecoverable error: timeout" } ) end