anchor.diff:          end,
       {noreply, fin_stream(StreamRef, Fin, State3)};
   handle_info({gun_response, C, StreamRef, Fin, Status, _Headers},
  -        State=#state{pid={C,_}, streams=Streams}) ->
  +        State=#state{pid=C, streams=Streams}) ->
       if
           Status < 300 ->
               ok;
  
positive.code:             do_publish({URI, [User, Pass], ContentType, Body}, [], State)
      end.
  
  do_publish({URI, _Auth, ContentType, Body}=Msg, Headers, State=#state{pid={C,_}, streams=Streams}) ->
      StreamRef = gun:post(C, URI,
          [{<<"content-type">>, ContentType} | Headers], Body),
      State#state{streams=maps:put(StreamRef, Msg, Streams)}.
  
negative.code:         publish_uplinks=PubUp, publish_events=PubEv, name=UserName, pass=Password}=Conn]) ->
      ok = pg2:join({backend, App}, self()),
      try
          {ok, ensure_gun(
              #state{conn=Conn,
                  publish_uplinks=lorawan_connector:prepare_filling(PubUp),
                  publish_events=lorawan_connector:prepare_filling(PubEv),
                  auth=lorawan_connector:prepare_filling([UserName, Password]),
                  nc=1})}
      catch
          _:Error ->
              lorawan_connector:raise_failed(Id, Error),
              {stop, shutdown}
      end.
  
  handle_call(_Request, _From, State) ->
      {reply, {error, unknownmsg}, State}.
  
  