Skip to content

escalate error to client process  #2

@fogfish

Description

@fogfish

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};

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions