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