anchor.diff:          [<<"websocket">>, _Sid] ->
               {upgrade, protocol, cowboy_websocket};
           _ ->
  -            {ok, Req, Config}
  +            {ok, Req, #http_state{config = Config}}
       end.
   
   %% Http handlers
  
positive.code:     ok;
  
  terminate(_Req, _HttpState = #http_state{heartbeat_tref = HeartbeatTRef, pid = Pid}) ->
      safe_ubsub_caller(Pid, self()),
      case HeartbeatTRef of
          undefined ->
              ok;
  
negative.code:              end,
      cowboy_req:reply(200, text_headers(), Packet, Req).
  
  safe_unsub_caller(undefined, _Caller) ->
      ok;
  
  safe_unsub_caller(_Pid, undefined) ->
      ok;
  
  safe_unsub_caller(Pid, Caller) ->
      try
          socketio_session:unsub_caller(Pid, Caller),
          ok
  