Shutdown UTP socket on short write.

This commit is contained in:
Juliusz Chroboczek 2011-02-18 00:24:30 +00:00
parent c9bbab05ee
commit eb715e8018
1 changed files with 1 additions and 0 deletions

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