anchor.diff:      Headers = [{<<"content-type">>, <<"text/event-stream">>}],
       {ok, Req2} = cowboy_req:chunked_reply(200, Headers, Req),
       State = #st{dbname=DbId, last_seq=Since, mode=eventsource},
  -    info(db_updated, Req2, State).
  +    info(db_updated, Req2, State#st{subscribed=true}).
   
   
   
  
positive.code: 
  
  
  terminate(_Reason, _Req, #st{dbname=DbId}) ->
      %% TODO improve closing of streamed changes
      %% by default, cowboy does not close connection
      %% this will never be called as we will receive
  
negative.code: -export([handle/2]).
  -export([terminate/3]).
  
  -record(st, {dbname, changes, last_seq, mode, subscribed}).
  
  init(_Type, Req, []) ->
      {Feed, Req2} = cowboy_req:qs_val(<<"feed">>, Req, <<"normal">>),
  