]> granicus.if.org Git - transmission/commitdiff
Shutdown UTP socket on short write.
authorJuliusz Chroboczek <jch@pps.univ-paris-diderot.fr>
Fri, 18 Feb 2011 00:24:30 +0000 (00:24 +0000)
committerJuliusz Chroboczek <jch@pps.univ-paris-diderot.fr>
Fri, 18 Feb 2011 00:24:30 +0000 (00:24 +0000)
libtransmission/peer-io.c

index fef573d061147a0c027d52dabcfb6c63725d382c..32311562a766bb26c5a787b3bd4f1eedf576cb88 100644 (file)
@@ -396,6 +396,7 @@ 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 );
     }
 }