Don't call UTP_Close multiple times.

Greg says it's evil.
This commit is contained in:
Juliusz Chroboczek 2011-02-18 00:24:36 +00:00
parent bd0ea13701
commit 4d5f8dbb92
1 changed files with 0 additions and 2 deletions

View File

@ -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 );
}
}