anchor.diff:      _ = send_caller({error, timeout}, Active),
       {noreply, State#state{ active = undefined }};
   
  +handle_info({tcp_closed, _Socket}, State) ->
  +    disconnect(State);
  +
   handle_info({_Proto, Sock, _Data}, State) ->
       ok = inet:setopts(Sock, [{active, once}]),
       {noreply, State}.
  
positive.code: 
  %% @private
  handle_call({req, Msg, Timeout}, From, State) ->
      {noreply, send_request(new_request(Msg, From, Timeout), State)}.
  
  %% @private
  %% @todo handle timeout
  
negative.code:             {ok, State#state{sock = Sock}};
          Error -> Error
      end.
  
  
  disconnect(State) ->
      %% Tell any pending requests we've disconnected
      _ = case State#state.active of
              undefined ->
                  ok;
              Request ->
                  send_caller({error, disconnected}, Request)
          end,
  
      %% Make sure the connection is really closed
      case State#state.sock of
          undefined ->
              ok;
          Sock ->
              gen_tcp:close(Sock)
      end,
      NewState = State#state{sock = undefined, active = undefined},
      {stop, disconnected, NewState}.
  
  
  %% @private
  