starttls hogs CPU
Simon Josefsson
jas at extundo.com
Sun Oct 14 03:12:52 JST 2001
Without this, starttls busy-loops and hogs all CPU. Maybe a new
release is in place?
2001-10-13 Simon Josefsson <jas at extundo.com>
* starttls.c (main): Clear fd sets before select().
--- starttls.c.~1.6.~ Sat Nov 18 05:44:00 2000
+++ starttls.c Sat Oct 13 20:09:03 2001
@@ -260,6 +260,7 @@
while (1)
{
+ FD_ZERO (&readfds);
FD_SET (tls_fd, &readfds);
FD_SET (in, &readfds);
if (select (tls_fd+1, &readfds, NULL, NULL, NULL) == -1
@@ -276,6 +277,7 @@
goto finish;
for (retry = buffer; nbuffer > 0; nbuffer -= wrote, retry += wrote)
{
+ FD_ZERO (&writefds);
FD_SET (tls_fd, &writefds);
if (select (tls_fd+1, NULL, &writefds, NULL, NULL) == -1)
{
@@ -299,6 +301,7 @@
goto finish;
for (retry = buffer; nbuffer > 0; nbuffer -= wrote, retry += wrote)
{
+ FD_ZERO (&writefds);
FD_SET (out, &writefds);
if (select (out+1, NULL, &writefds, NULL, NULL) == -1)
{
More information about the Emacs-mime-en
mailing list