nictuku / dht

Kademlia/Mainline DHT node in Go.
Other
826 stars 144 forks source link

nil pointer dereference in peer_store.go #10

Closed nictuku closed 11 years ago

nictuku commented 11 years ago

panic: runtime error: invalid memory address or nil pointer dereference [signal 0xb code=0x1 addr=0x4 pc=0x41059d]

goroutine 28 [running]: github.com/nictuku/dht.(_peerContactsSet).put(0xc20030b230, 0xc2010e7dc0, 0x6, 0xc20030b230) /home/nictuku/src/github.com/nictuku/dht/peer_store.go:42 +0xaf github.com/nictuku/dht.(_peerStore).addContact(0xc2002e59b0, 0xc201309b20, 0x14, 0xc2010e7dc0, 0x6, ...) /home/nictuku/src/github.com/nictuku/dht/peer_store.go:121 +0xa6 github.com/nictuku/dht.(_DHT).replyAnnouncePeer(0xc2000f6380, 0xc20173a7b0, 0xc20117cf50, 0x8, 0xc2010e7cd0, ...) /home/nictuku/src/github.com/nictuku/dht/dht.go:484 +0x2cf github.com/nictuku/dht.(_DHT).processPacket(0xc2000f6380, 0xc2008f0000, 0x86, 0x1000, 0xc20173a7b0, ...) /home/nictuku/src/github.com/nictuku/dht/dht.go:389 +0x12b7 github.com/nictuku/dht.(*DHT).DoDHT(0xc2000f6380) /home/nictuku/src/github.com/nictuku/dht/dht.go:253 +0xa91