<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[wolfSSL - Embedded SSL Library — getting sigpipe from wolfSSL_write]]></title>
		<link>https://www.wolfssl.com/forums/topic2154-getting-sigpipe-from-wolfsslwrite.html</link>
		<atom:link href="https://www.wolfssl.com/forums/feed-rss-topic2154.xml" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in getting sigpipe from wolfSSL_write.]]></description>
		<lastBuildDate>Mon, 19 Aug 2024 16:06:09 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: getting sigpipe from wolfSSL_write]]></title>
			<link>https://www.wolfssl.com/forums/post7803.html#p7803</link>
			<description><![CDATA[<p>Hi db, </p><p>My name is Anthony and I am a member of the wolfSSL team. From what I understand, sigpipe means&nbsp; the peer closed the socket when there was data still available to read.&nbsp; This is generally resolved by, on both sides, doing a shutdown (for example, calling wolfSSL_shutdown() ) , checking for WOLFSSL_SHUTDOWN_NOT_DONE, and then doing wolfSSL_shutdown() again.&nbsp; You can search for WOLFSSL_SHUTDOWN_NOT_DONE in wolfssl/examples/server/server.c and wolfssl/examples/client/client.c to see what I mean. </p><p>Warm regards, Anthony</p>]]></description>
			<author><![CDATA[null@example.com (anthony)]]></author>
			<pubDate>Mon, 19 Aug 2024 16:06:09 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post7803.html#p7803</guid>
		</item>
		<item>
			<title><![CDATA[getting sigpipe from wolfSSL_write]]></title>
			<link>https://www.wolfssl.com/forums/post7801.html#p7801</link>
			<description><![CDATA[<p>hello</p><p>i have a c++ app that connects to another machine and (rarely) gets sigpipe, which is bad since i want the app to keep running and try again later<br />the stacktrace looks like this:<br />wolfSSL_write -&gt; <br />SendData -&gt; <br />SendBuffered.part.0 -&gt; <br />EmbedSend -&gt; <br />&quot;../sysdeps/unix/sysv/linux/send.c&quot;, line 23, in __libc_send -&gt; <br />&quot;../sysdeps/unix/sysv/linux/send.c&quot;, line 28, in __libc_disable_asynccancel</p><p>i assume that the other machine disconnects between the app checking the validity of the connection and wolfSSL_write<br />obviously, i can make a signal handler that throws an exception on sigpipe and then catches the exception outside wolfSSL_write<br />but i am curious whether i can make a signal handler that ignores the sigpipe, and then just continue with the wolfSSL_write<br />i assume wolfSSL_write should return -1, and then i would get the exact error with wolfSSL_get_error</p><p>my questions are<br />1. did i understand correctly that on sigpipe while writing, although sigpipe is raised, wolfssl will return -1?<br />2. what is the error i would receive from wolfSSL_get_error in this case?</p><p>thank you</p>]]></description>
			<author><![CDATA[null@example.com (da)]]></author>
			<pubDate>Fri, 16 Aug 2024 15:48:04 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post7801.html#p7801</guid>
		</item>
	</channel>
</rss>
