Permalink
Browse files

Improved magnet link support.

  • Loading branch information...
1 parent 77bc519 commit 99d2b277b9d040d88a72b3fbc591678298ac9394 @arcusfelis committed Mar 18, 2013
@@ -112,9 +112,9 @@ check_infohash(InfoHash) ->
end.
handover_control(Socket, RPid, CPid) ->
- case gen_tcp:controlling_process(Socket, RPid) of
- ok -> etorrent_peer_control:initialize(CPid, incoming),
- ok;
+ etorrent_peer_control:initialize(CPid, incoming),
+ case etorrent_peer_recv:forward_control(Socket, RPid) of
+ ok -> ok;
{error, enotconn} ->
etorrent_peer_control:stop(CPid),
throw({error, enotconn})
@@ -191,7 +191,7 @@ unsafe_insert_nodes(NodeInfos) ->
%
-spec is_interesting(nodeid(), ipaddr(), portnum()) -> boolean().
-is_interesting(ID, IP, Port) ->
+is_interesting(ID, IP, Port) when is_integer(ID) ->
gen_server:call(srv_name(), {is_interesting, ID, IP, Port}).
-spec closest_to(nodeid()) -> list(nodeinfo()).
Oops, something went wrong.

0 comments on commit 99d2b27

Please sign in to comment.