Don't call UTP_Close multiple times.
Greg says it's evil.
This commit is contained in:
parent
bd0ea13701
commit
4d5f8dbb92
|
@ -376,7 +376,6 @@ utp_on_read(void *closure, const unsigned char *buf, size_t buflen)
|
|||
rc = evbuffer_add( io->inbuf, buf, buflen );
|
||||
if( rc < 0 ) {
|
||||
tr_nerr( "UTP", "On read evbuffer_add" );
|
||||
UTP_Close( io->utp_socket );
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -396,7 +395,6 @@ utp_on_write(void *closure, unsigned char *buf, size_t buflen)
|
|||
rc = evbuffer_remove( io->outbuf, buf, buflen );
|
||||
if( rc < (long)buflen ) {
|
||||
tr_nerr( "UTP", "Short write: %d < %ld", rc, (long)buflen);
|
||||
UTP_Close( io->utp_socket );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue