jlouis / etorrent

Erlang Bittorrent Client
BSD 2-Clause "Simplified" License
294 stars 50 forks source link

Bug in hackney binding: function_clause hackney,request #138

Closed arcusfelis closed 11 years ago

arcusfelis commented 11 years ago
=SUPERVISOR REPORT==== 12-Feb-2013::12:02:54 ===                                                                                                                    [178/1908]
     Supervisor: {<8811.432.0>,etorrent_torrent_sup}
     Context:    child_terminated
     Reason:     {function_clause,
                     [{hackney,request,
                          ["http://localhost:6969/announce?event=started&info_hash=%87%BE%031P%BD%8D%D1%80%14x%A3-Ly%E5L%B5UR&peer_id=-ETd011-656671626512&uploaded=0&download
ed=0&left=0&port=1739&compact=1",
                           get,
                           [{<<"User-Agent">>,"etorrent/1.2.1"},
                            {<<"Host">>,"localhost:6969"},
                            {<<"Accept">>,"*/*"},
                            {<<"Accept-Encoding">>,"gzip, identity"}],
                           <<>>,
                           [{pool,default},{recv_timeout,15000}]],
                          [{file,"src/hackney.erl"},{line,182}]},
                      {etorrent_http,request,1,
                          [{file,"src/etorrent_http.erl"},{line,29}]},
                      {etorrent_tracker_communication,contact_tracker_http,3,
                          [{file,"src/etorrent_tracker_communication.erl"},
                           {line,286}]},
                      {etorrent_tracker_communication,contact_tracker_tier,4,
                          [{file,"src/etorrent_tracker_communication.erl"},
                           {line,176}]},
                      {etorrent_tracker_communication,contact_tracker,4,
                          [{file,"src/etorrent_tracker_communication.erl"},
                           {line,161}]},
                      {etorrent_tracker_communication,contact_tracker,2,
                          [{file,"src/etorrent_tracker_communication.erl"},
                           {line,148}]},
                      {etorrent_tracker_communication,handle_info,2,
                          [{file,"src/etorrent_tracker_communication.erl"},
                           {line,119}]},
                      {gen_server,handle_msg,5,
                          [{file,"gen_server.erl"},{line,607}]}]}
     Offender:   [{pid,<8811.442.0>},
                  {name,tracker_communication},
                  {mfargs,
                      {etorrent_tracker_communication,start_link,
                          [<8811.440.0>,
                           [["http://localhost:6969/announce"]],
                           <<135,190,3,49,80,189,141,209,128,20,120,163,45,76,
                             121,229,76,181,85,82>>,
                           <<"-ETd011-656671626512">>,1]}},
                  {restart_type,transient},
                  {shutdown,15000},
                  {child_type,worker}]
arcusfelis commented 11 years ago

First and second parameters were passed in the wrong order.

jlouis commented 11 years ago

Ah! Do you have a patch for that?

arcusfelis commented 11 years ago

Yes, I have. I am working on the magnet link support, so I fixed few bugs by the way. We had a bug with endgame (fixed too). I also ported common tests from the old repository. I will create a PR as soon as I complete writing BEP-9 extension.

It seems, that etorrent does not announce its own torrents using DHT. I am planning fixing this too.