diff -x Entries -x '*.orig' -u -w -N -r /develop/mldonkey-2/src/networks/bittorrent/bTClients.ml ./networks/bittorrent/bTClients.ml --- src/networks/bittorrent/bTClients.ml 2004-01-28 22:56:19.000000000 +0100 +++ src/networks/bittorrent/bTClients.ml 2004-01-28 22:59:24.000000000 +0100 @@ -812,8 +812,6 @@ lprintf "connecting %s:%d\n" (Ip.to_string ip) port; end; connection_try c.client_connection_control; - if can_open_connection () then - begin let sock = connect "bittorrent download" (Ip.to_inet_addr ip) port (fun sock event -> @@ -857,7 +855,6 @@ be parsed*) set_bt_sock sock !verbose_msg_clients (BTHeader (client_parse_header !counter (ref (Some c)) true)) - end with e -> lprintf "Exception %s while connecting to client\n" (Printexc2.to_string e); @@ -889,10 +886,7 @@ lprintf "CONNECTION RECEIVED FROM %s\n" (Ip.to_string (Ip.of_inet_addr from_ip)) ; - (*Reject this connection if we don't want - to bypass the max_connection parameter*) - if can_open_connection () then - begin + let sock = TcpBufferedSocket.create "bittorrent client connection" s (fun sock event -> @@ -923,11 +917,6 @@ (*Again : 'hook' client_parse_header to the socket*) set_bt_sock sock !verbose_msg_clients (BTHeader (client_parse_header !counter c false)); - end - else - (*don't forget to close the incoming sock if we can't - open a new connection*) - Unix.close s | _ -> () ) in listen_sock := Some s;