Commit 480725bd authored by Philip Withnall's avatar Philip Withnall Committed by Olivier Crête

agent: Handle EPIPE from pseudo_tcp_socket_send()

As with send(), pseudo_tcp_socket_send() may return EPIPE if the local
side of the connection has been closed using close() or shutdown(). It
currently doesn’t, but will do once pseudo-TCP FIN–ACK support has been
parent fe96a395
......@@ -1455,7 +1455,8 @@ pseudo_tcp_socket_send_messages (PseudoTcpSocket *self,
if (pseudo_tcp_socket_get_error (self) == EWOULDBLOCK)
goto out;
if (pseudo_tcp_socket_get_error (self) == ENOTCONN)
if (pseudo_tcp_socket_get_error (self) == ENOTCONN ||
pseudo_tcp_socket_get_error (self) == EPIPE)
g_set_error (error, G_IO_ERROR, G_IO_ERROR_WOULD_BLOCK,
"TCP connection is not yet established.");
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment