Fix a bug in DHT that caused panics sometimes
This commit is contained in:
parent
6f2121e33f
commit
d51acba9be
1 changed files with 1 additions and 1 deletions
|
|
@ -584,7 +584,7 @@ impl Stream for PeerStream {
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.get_index(pos)
|
.get_index(pos)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
if pos < end {
|
if pos + 1 < end {
|
||||||
self.initial_peers_pos = Some((pos + 1, end));
|
self.initial_peers_pos = Some((pos + 1, end));
|
||||||
}
|
}
|
||||||
self.absolute_stream_pos += 1;
|
self.absolute_stream_pos += 1;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue