anchor.diff:  	{ok, Socket} when  is_list(TLSOptions) ->
   	    gen_tcp:close(LSock),
   	    ?DBG('<--data ssl:connect(~p, ~p)~n~p~n',[Socket,TLSOptions,State0]),
  -	    case ssl:connect(Socket, TLSOptions) of
  +	    case ssl:connect(Socket, TLSOptions, DTimeout) of
   		{ok, TLSSocket} ->
   		    {ok, State0#state{dsock={ssl,TLSSocket}}};
   		{error, Reason} ->
  
positive.code: %%--------------------------------------------------------------------------
  handle_ctrl_result({tls_upgrade, _}, #state{csock = {tcp, Socket},
  					    tls_options = TLSOptions,
  					    caller = open, client = From}
  		   = State0) ->
      ?DBG('<--ctrl ssl:connect(~p, ~p)~n~p~n',[Socket,TLSOptions,State0]),
      case ssl:connect(Socket, TLSOptions) of
  	{ok, TLSSocket} ->
  	    State = State0#state{csock = {ssl,TLSSocket}},
  	    send_ctrl_message(State, mk_cmd("PBSZ 0", [])),
  
negative.code:     end;
  
  accept_data_connection(#state{mode = passive,
  			      dtimeout = DTimeout,
  			      dsock = {tcp,Socket},
  			      tls_options = TLSOptions} = State) when is_list(TLSOptions) ->
      ?DBG('<--data ssl:connect(~p, ~p)~n~p~n',[Socket,TLSOptions,State]),
      case ssl:connect(Socket, TLSOptions, DTimeout) of
  	{ok, TLSSocket} ->
  	    {ok, State#state{dsock={ssl,TLSSocket}}};
  	{error, Reason} ->
  