diff options
author | Alexandre Van de Sande <alex.vandesande@ethdev.com> | 2015-02-23 20:05:15 +0800 |
---|---|---|
committer | Alexandre Van de Sande <alex.vandesande@ethdev.com> | 2015-02-23 20:05:15 +0800 |
commit | dea65840186fe861017524c9cb59ae07ac97ed06 (patch) | |
tree | 5cb5e339b9ce77a2a3c92cf8a10c4294fcf7965c /p2p/discover | |
parent | bb3338df6363d8267a24190584f0908463241a6c (diff) | |
parent | dd086791acf477da7641c168f82de70ed0b2dca6 (diff) | |
download | dexon-dea65840186fe861017524c9cb59ae07ac97ed06.tar dexon-dea65840186fe861017524c9cb59ae07ac97ed06.tar.gz dexon-dea65840186fe861017524c9cb59ae07ac97ed06.tar.bz2 dexon-dea65840186fe861017524c9cb59ae07ac97ed06.tar.lz dexon-dea65840186fe861017524c9cb59ae07ac97ed06.tar.xz dexon-dea65840186fe861017524c9cb59ae07ac97ed06.tar.zst dexon-dea65840186fe861017524c9cb59ae07ac97ed06.zip |
Merge branch 'develop' into ui
Diffstat (limited to 'p2p/discover')
-rw-r--r-- | p2p/discover/udp.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/p2p/discover/udp.go b/p2p/discover/udp.go index b2a895442..69e9f3c2e 100644 --- a/p2p/discover/udp.go +++ b/p2p/discover/udp.go @@ -253,7 +253,8 @@ func (t *udp) loop() { case reply := <-t.replies: // run matching callbacks, remove if they return false. - for i, p := range pending { + for i := 0; i < len(pending); i++ { + p := pending[i] if reply.from == p.from && reply.ptype == p.ptype && p.callback(reply.data) { p.errc <- nil copy(pending[i:], pending[i+1:]) |