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
implemented.
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.");
else