libeech

BitTorrent library
git clone git://z3bra.org/libeech.git
Log | Files | Refs | README | LICENSE

commit 7f5175a8d8f118bbc9f5b0f8d68c240020495d28
parent 84c079251a69ad84d676a2b0db32a8b3f8ca96c7
Author: z3bra <contactatz3bradotorg>
Date:   Tue Feb 13 23:25:31 -0500

Return immediately upon deleting a peer

Diffstat:
libeech.c | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libeech.c b/libeech.c @@ -354,8 +354,10 @@ pwprx(struct torrent *t, struct peer *p) /* receive and verify handshake */ if (!(p->state & HANDSHAKERCVD)) { pwphsrecv(p); - if (p->buflen >= 68 && pwphsck(t, p->buf, p->buflen)) + if (p->buflen >= 68 && pwphsck(t, p->buf, p->buflen)) { delpeer(t->peers, p); + return -1; + } p->state |= HANDSHAKERCVD; } return 0;