http socket do not send any message if underlying connection is terminated (e.g. emfile). Only pipe bound clients are terminated by free with status normal.
'STREAM'({Prot, _, {terminated, _Reason}}, Pipe, #fsm{stream=Stream, trace = Pid}=State)
when ?is_transport(Prot) ->
case htstream:state(Stream#stream.recv) of
payload ->
% time to meaningful response
?trace(Pid, {http, ttmr, tempus:diff(Stream#stream.ts)}),
pipe:b(Pipe, {http, self(), eof});
_ ->
ok
end,
{stop, normal, State};