anchor.diff:  %%% connections to HTTP servers.
   -module(ns_connection_pool).
   
  --export([
  -        start_link/1,
  -        maybe_take_socket/2,
  -        put_socket/3
  -    ]).
  --export([
  -        init/1,
  -        handle_call/3,
  -        handle_cast/2,
  -        handle_info/2,
  -        code_change/3,
  -        terminate/2
  -    ]).
  +-export([start_link/1,
  +         maybe_take_socket/2,
  +         put_socket/3]).
  +
  +-export([init/1,
  +         handle_call/3,
  +         handle_cast/2,
  +         handle_info/2,
  +         code_change/3,
  +         terminate/2]).
   
   -behaviour(gen_server).
   
   -record(ns_connection_pool, {
  -        destinations = dict:new(),
  -        sockets = dict:new(),
  -        clients = dict:new(), % Pid => {Dest, MonRef}
  -        queues = dict:new(),  % Dest => queue of Froms
  -        max_pool_size = 50 :: non_neg_integer(),
  -        timeout = 300000 :: non_neg_integer()
  -    }).
  +          destinations = dict:new(),
  +          sockets = dict:new(),
  +          clients = dict:new(), % Pid => {Dest, MonRef}
  +          queues = dict:new(),  % Dest => queue of Froms
  +          max_pool_size = 50 :: non_neg_integer(),
  +          timeout = 300000 :: non_neg_integer()
  +         }).
   
   maybe_take_socket(Server, Dest) ->
       gen_server:call(Server, {socket, self(), Dest}, infinity).
  
positive.code: 
  close_sockets(Sockets) ->
      lists:foreach(fun({Socket, {_Dest, Timer}}) ->
                  gen_tcp:close(Socket),
                  erlang:cancel_timer(Timer)
          end, dict:to_list(Sockets)).
  
  cancel_timer(Timer, Socket) ->
      case erlang:cancel_timer(Timer) of
  
negative.code:                     {_, Timer} = dict:fetch(Socket, State#ns_connection_pool.sockets),
                      cancel_timer(Timer, Socket),
                      NewState = State#ns_connection_pool{
                                   destinations = update_dest(Dest, Sockets, Dests),
                                   sockets = dict:erase(Socket, State#ns_connection_pool.sockets)
                                  },
                      {{ok, Socket}, NewState};
                  {error, badarg} -> % Pid has timed out, reuse for someone else
                      inet:setopts(Socket, [{active, once}]),
  