Log the type for a rare DHT crash

This commit is contained in:
Matt Joiner 2014-12-01 03:29:06 -06:00
parent 6d2f1c8cd7
commit b1da5d0656
1 changed files with 2 additions and 1 deletions

View File

@ -796,7 +796,8 @@ func extractValues(m Msg) (vs []util.CompactPeer) {
} }
vl, ok := v.([]interface{}) vl, ok := v.([]interface{})
if !ok { if !ok {
panic(v) log.Printf("unexpected krpc values type: %T", v)
return
} }
vs = make([]util.CompactPeer, 0, len(vl)) vs = make([]util.CompactPeer, 0, len(vl))
for _, i := range vl { for _, i := range vl {