--- /usr/local/lib/erlang/lib/inets-4.5/src/ftp.erl	Tue Aug 23 13:28:08 2005
+++ ftp.erl	Tue Aug 23 16:39:43 2005
@@ -790,11 +790,11 @@
 %% terminate/2 and code_change/3
 %%--------------------------------------------------------------------------
 terminate(normal, State) ->
-    do_termiante({error, econn}, State);
+    do_terminate({error, econn}, State);
 terminate(Reason, State) ->
-    do_termiante({error, Reason}, State).
+    do_terminate({error, Reason}, State).
 
-do_termiante(ErrorMsg, State) ->
+do_terminate(ErrorMsg, State) ->
     close_data_connection(State),
     close_ctrl_connection(State),
     case State#state.client of
@@ -1313,6 +1313,8 @@
 
 close_data_connection(#state{dsock = undefined}) ->
     ok;
+close_data_connection(#state{dsock = {lsock, Socket}}) ->
+    close_connection(Socket);
 close_data_connection(#state{dsock = Socket}) ->
     close_connection(Socket).
 
