Ignore ESHUTDOWN on the server side too
We got the client, but not the server. We can see the same error there
too.
Change-Id: I24058efedc8f4d09518f905ac9582ad37ef031e7
diff --git a/aos/network/sctp_server.cc b/aos/network/sctp_server.cc
index 6e32c8a..c8563d5 100644
--- a/aos/network/sctp_server.cc
+++ b/aos/network/sctp_server.cc
@@ -116,7 +116,7 @@
// And send.
const ssize_t size = sendmsg(fd_, &outmsg, MSG_NOSIGNAL | MSG_DONTWAIT);
if (size == -1) {
- if (errno == EPIPE || errno == EAGAIN) {
+ if (errno == EPIPE || errno == EAGAIN || errno == ESHUTDOWN) {
return false;
}
PCHECK(size == static_cast<ssize_t>(data.size()));