]> granicus.if.org Git - transmission/commitdiff
Don't call UTP_Close multiple times.
authorJuliusz Chroboczek <jch@pps.univ-paris-diderot.fr>
Fri, 18 Feb 2011 00:24:36 +0000 (00:24 +0000)
committerJuliusz Chroboczek <jch@pps.univ-paris-diderot.fr>
Fri, 18 Feb 2011 00:24:36 +0000 (00:24 +0000)
Greg says it's evil.

libtransmission/peer-io.c

index 32311562a766bb26c5a787b3bd4f1eedf576cb88..0fcf973c96b02463bd01b8ffad6ef795c09c9a90 100644 (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 );
     }
 }