curl-library
Re: Problems with SMTP connection re-using (SSL read: error:00000000:lib(0):func(0):reason(0))
Date: Fri, 7 Dec 2012 22:01:07 +0100
On Fri, Dec 07, 2012 at 11:28:14AM +0100, Volker Schmid wrote:
> I'm just having this problem. I successfully sent an email with libcurl and the connection stays open (first line). Then I try to send another one:
>
> ...
> 2012-12-06 15:33:49 : CURL: Connection #0 to host smtp.xxxxxxxxxx.com left intact
> 2012-12-06 15:34:59 : CURL: Re-using existing connection! (#0) with host (nil)
> 2012-12-06 15:34:59 : CURL: Connected to (nil) (80.67.29.4) port 25 (#0)
> 2012-12-06 15:34:59 : CURL: MAIL FROM:<qa1_at_xxxxxxxxxxx.com>
> 2012-12-06 15:34:59 : CURL: SSL read: error:00000000:lib(0):func(0):reason(0), errno 54
> 2012-12-06 15:34:59 : CURL: SSL_write() returned SYSCALL, errno = 32
> 2012-12-06 15:34:59 : CURL: Closing connection #0
> 2012-12-06 15:34:59 : CURL: Failure when receiving data from the peer
>
> Any idea why it complains with SSL read: error:00000000:lib(0):func(0):reason(0), errno 54?
You'd have to look up the OpenSSL documentation to see what errno 54
means, but if the next line can be believed and errno=32 is actually a
syscall error, then it's EPIPE - Broken pipe. It sound like it's just
that the remote server has closed the connection.
Does libcurl make a new connection and retry when this happens? If not, then it
probably should.
> Am I doing something wrong here?
>
> But occasionally it is working, but I don't know the reason (same code, same smtp-server, same user):
Different timeouts before the connection is closed, probably.
>>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-12-07