diff --git a/libtransmission/handshake.c b/libtransmission/handshake.c index 6d7ade940..834bac436 100644 --- a/libtransmission/handshake.c +++ b/libtransmission/handshake.c @@ -749,6 +749,7 @@ readYa( tr_handshake * handshake, struct evbuffer * inbuf ) const uint8_t *myKey, *secret; int len; +dbgmsg( handshake, "in readYa... need %d, have %d", (int)KEY_LEN, (int)EVBUFFER_LENGTH( inbuf ) ); if( EVBUFFER_LENGTH( inbuf ) < KEY_LEN ) return READ_MORE; @@ -758,6 +759,7 @@ readYa( tr_handshake * handshake, struct evbuffer * inbuf ) memcpy( handshake->mySecret, secret, KEY_LEN ); tr_sha1( handshake->myReq1, "req1", 4, secret, KEY_LEN, NULL ); +dbgmsg( handshake, "sending out our pad a" ); /* send our public key to the peer */ walk = outbuf; myKey = tr_cryptoGetMyPublicKey( handshake->crypto, &len ); @@ -768,8 +770,7 @@ readYa( tr_handshake * handshake, struct evbuffer * inbuf ) setReadState( handshake, AWAITING_PAD_A ); tr_peerIoWrite( handshake->io, outbuf, walk-outbuf ); - - return READ_DONE; + return READ_AGAIN; } static int diff --git a/libtransmission/trevent.c b/libtransmission/trevent.c index 926d13265..b6cfaa4ce 100644 --- a/libtransmission/trevent.c +++ b/libtransmission/trevent.c @@ -229,7 +229,7 @@ tr_eventInit( tr_handle * handle ) eh = tr_new0( tr_event_handle, 1 ); eh->lock = tr_lockNew( ); eh->h = handle; - eh->pulseInterval = timevalMsec( 20 ); + eh->pulseInterval = timevalMsec( 50 ); eh->thread = tr_threadNew( libeventThreadFunc, eh, "libeventThreadFunc" ); }