Skip to content

Commit

Permalink
修复bug
Browse files Browse the repository at this point in the history
  • Loading branch information
zxx-hub committed Oct 15, 2014
1 parent 1514771 commit 749c870
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions KRPC.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,11 @@ func (krpc *KRPC) Response(msg *KRPCMessage) {

func (krpc *KRPC) Query(msg *KRPCMessage) {
if query, ok := msg.Addion.(*Query); ok {
//krpc.Dht.log.Println(query.Y) 干掉输出避免磁盘写盘的情况
krpc.Dht.log.Println(query.Y) //干掉输出避免磁盘写盘的情况
if query.Y == "get_peers" {

if infohash, ok := query.A["info_hash"].(string); ok {
//krpc.Dht.log.Println(Id(infohash).String())

krpc.Dht.dao.HashIns1.Exec(Id(infohash).String())
//ih := Id(infohash)
//krpc.Dht.dao.HashIns1.Exec(Id(infohash).String())
krpc.Dht.msq.addMessage(Id(infohash).String(), 1)

// krpc.Dht.log.Println(Id(infohash).String())
Expand Down

0 comments on commit 749c870

Please sign in to comment.