anchor.diff:                      elli_tcp:close(Socket),
                       From ! {self(), ok},
                       ok;
  -                {error, closed} ->
  +                {error, Closed} when Closed =:= closed orelse Closed =:= enotconn ->
                       From ! {self(), {error, closed}},
                       ok
               end;
  
positive.code:                     case elli_tcp:sendfile(Fd, Req#req.socket, Offset, Length, []) of
                          {ok, _BytesSent} ->
                              ok;
                          {error, closed} ->
                              handle_event(Mod, client_closed, [before_response], Args)
                      end;
                  {error, closed} ->
                      handle_event(Mod, client_closed, [before_response], Args)
              after
                  file:close(Fd)
  
negative.code:                     case elli_tcp:recv(Socket, N, body_timeout(Opts)) of
                          {ok, Data} ->
                              {<<Buffer/binary, Data/binary>>, <<>>};
                          {error, Closed} when Closed =:= closed orelse Closed =:= enotconn ->
                              handle_event(Mod, client_closed, [receiving_body], Args),
                              ok = elli_tcp:close(Socket),
                              exit(normal);
  