mirror of
https://github.com/transmission/transmission.git
synced 2026-05-08 09:39:08 +01:00
Try out some of SoftwareElves' suggestions for faster startup connections
This commit is contained in:
@@ -24,6 +24,8 @@
|
||||
#include "trevent.h"
|
||||
#include "utils.h"
|
||||
|
||||
#define IO_TIMEOUT_SECS 8
|
||||
|
||||
/**
|
||||
***
|
||||
**/
|
||||
@@ -136,6 +138,7 @@ tr_peerIoNew( struct tr_handle * handle,
|
||||
didWriteWrapper,
|
||||
gotErrorWrapper,
|
||||
c );
|
||||
bufferevent_settimeout( c->bufev, IO_TIMEOUT_SECS, IO_TIMEOUT_SECS );
|
||||
bufferevent_enable( c->bufev, EV_READ|EV_WRITE );
|
||||
return c;
|
||||
}
|
||||
@@ -275,6 +278,7 @@ tr_peerIoReconnect( tr_peerIo * io )
|
||||
didWriteWrapper,
|
||||
gotErrorWrapper,
|
||||
io );
|
||||
bufferevent_settimeout( io->bufev, IO_TIMEOUT_SECS, IO_TIMEOUT_SECS );
|
||||
bufferevent_enable( io->bufev, EV_READ|EV_WRITE );
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -64,7 +64,7 @@ enum
|
||||
|
||||
/* set this too high and there will be a lot of churn.
|
||||
* set it too low and you'll get peers too slowly */
|
||||
MAX_RECONNECTIONS_PER_PULSE = 8,
|
||||
MAX_RECONNECTIONS_PER_PULSE = 10,
|
||||
|
||||
/* corresponds to ut_pex's added.f flags */
|
||||
ADDED_F_ENCRYPTION_FLAG = 1,
|
||||
|
||||
Reference in New Issue
Block a user