anchor.diff:           parse_validate_bucket_fast_warmup_settings/1]).
   
   -export([ns_log_cat/1, ns_log_code_string/1, alert_key/1]).
  +
  +-export([handle_streaming_wakeup/4,
  +         handle_pool_info_wait_wake/5]).
   
   -import(menelaus_util,
           [server_header/0,
  
positive.code:                       "menelaus_web streaming socket closed by client"),
              exit(normal)
      after 25000 ->
          ok
      end,
      handle_streaming(F, Req, HTTPRes, Res).
  
  
negative.code:         _ ->
              WaitChange = list_to_integer(WaitChangeS),
              menelaus_event:register_watcher(self()),
              erlang:send_after(WaitChange, self(), wait_expired),
              handle_pool_info_wait(Req, Id, UserPassword, LocalAddr, PassedETag)
      end.
  
  handle_pool_info_wait(Req, Id, UserPassword, LocalAddr, PassedETag) ->
      Info = mochijson2:encode(build_pool_info(Id, UserPassword, stable, LocalAddr)),
      ETag = integer_to_list(erlang:phash2(Info)),
      if
          ETag =:= PassedETag ->
              erlang:hibernate(?MODULE, handle_pool_info_wait_wake,
                               [Req, Id, UserPassword, LocalAddr, PassedETag]);
          true ->
              handle_pool_info_wait_tail(Req, Id, UserPassword, LocalAddr, ETag)
      end.
  
  handle_pool_info_wait_wake(Req, Id, UserPassword, LocalAddr, PassedETag) ->
      receive
          wait_expired ->
              handle_pool_info_wait_tail(Req, Id, UserPassword, LocalAddr, PassedETag);
          {notify_watcher, _} ->
              timer:sleep(200), %% delay a bit to catch more notifications
              consume_notifications(),
              handle_pool_info_wait(Req, Id, UserPassword, LocalAddr, PassedETag);
          _ ->
              exit(normal)
      end.
  
  consume_notifications() ->
  