Derek Zhou writes: > Robert Pluim writes: > >> Thatʼs always possible. You'd have to stick some instrumentation in >> things like connect_network_socket and wait_reading_process_output to >> narrow it down. >> > I think what happened is gnutls's internal buffering exhausts the > available data from the socket, so select blocks. There is an comment in > the code said gnutls leave one byte in the socket for select, but I > don't think it is doing this anymore. The following patch move the check > before the select and skip the select if there is data to be read in > gnutls. It fixed the occational stall in https. Sorry, the previous patch was wrong. Cannot reuse the fd_set intended for select. Corrected: