anchor.diff:  
   
   
  -terminate(_Reason, _Req, #st{dbname=DbId}) ->
  +terminate(_Reason, _Req, #st{dbname=DbId, subscribed=true}) ->
       %% TODO improve closing of streamed changes
       %% by default, cowboy does not close connection
       %% this will never be called as we will receive
  
positive.code:     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).
  
  
  
  
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">>),
  