don't timeout while uploading big messages

we did already set up the timeout when starting to send commands, but so
far we did not reset it when succeeding to send out data. rectify that.

REFFAIL: 87sgy92we3.fsf@jnanam.net
This commit is contained in:
Oswald Buddenhagen 2019-11-16 17:14:32 +01:00
parent 121448ceb9
commit dfa8c16f27

View File

@ -680,8 +680,6 @@ do_read( conn_t *sock, char *buf, int len )
int n; int n;
assert( sock->fd >= 0 ); assert( sock->fd >= 0 );
if (pending_wakeup( &sock->fd_timeout ))
conf_wakeup( &sock->fd_timeout, sock->conf->timeout );
#ifdef HAVE_LIBSSL #ifdef HAVE_LIBSSL
if (sock->ssl) { if (sock->ssl) {
if ((n = ssl_return( "read from", sock, SSL_read( sock->ssl, buf, len ) )) <= 0) if ((n = ssl_return( "read from", sock, SSL_read( sock->ssl, buf, len ) )) <= 0)
@ -1055,6 +1053,9 @@ socket_fd_cb( int events, void *aux )
if (events & POLLOUT) if (events & POLLOUT)
conf_notifier( &conn->notify, POLLIN, 0 ); conf_notifier( &conn->notify, POLLIN, 0 );
if (pending_wakeup( &conn->fd_timeout ))
conf_wakeup( &conn->fd_timeout, conn->conf->timeout );
#ifdef HAVE_LIBSSL #ifdef HAVE_LIBSSL
if (conn->state == SCK_STARTTLS) { if (conn->state == SCK_STARTTLS) {
start_tls_p2( conn ); start_tls_p2( conn );