Changeset 7432
- Timestamp:
- Dec 17, 2008, 1:29:03 PM (12 years ago)
- Location:
- trunk/libtransmission
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/bandwidth.c
r7419 r7432 298 298 tr_ptrArray * tmp; 299 299 struct tr_peerIo ** peers; 300 const size_t chunkSize = 1024; /* arbitrary */301 300 302 301 tmp = tr_ptrArrayNew( ); … … 313 312 for( i=0; i<n; ) 314 313 { 315 const int byteCount = tr_peerIoFlush( peers[i], dir, chunkSize ); 314 const int increment = n==1 ? 4096 : 1024; 315 const int byteCount = tr_peerIoFlush( peers[i], dir, increment); 316 316 317 317 if( byteCount ) 318 318 fprintf( stderr, "peer %p: %d bytes\n", peers[i], byteCount ); 319 319 320 if( byteCount == (int)chunkSize)320 if( byteCount == increment ) 321 321 ++i; 322 322 else -
trunk/libtransmission/peer-io.c
r7419 r7432 808 808 canReadWrapper( io, res, io ); 809 809 810 if( ( res <= 0 ) && ( io->gotError ) && ( errno != EAGAIN ) && ( errno != EINTR ) )810 if( ( res <= 0 ) && ( io->gotError ) && ( errno != EAGAIN ) && ( errno != EINTR ) && ( errno != EINPROGRESS ) ) 811 811 { 812 812 short what = EVBUFFER_READ | EVBUFFER_ERROR;
Note: See TracChangeset
for help on using the changeset viewer.