aos/network: reduce number of messsages on reconnect
Also incidentally send one abort per old association.
Change-Id: I2b7e98861367daaccd5f8ac79be7f1d1d23af89e
Signed-off-by: James Kuszmaul <james.kuszmaul@bluerivertech.com>
diff --git a/aos/network/sctp_server.cc b/aos/network/sctp_server.cc
index 15da7c0..2f6a041 100644
--- a/aos/network/sctp_server.cc
+++ b/aos/network/sctp_server.cc
@@ -76,7 +76,8 @@
scheduler.assoc_value = SCTP_SS_PRIO;
if (setsockopt(fd(), IPPROTO_SCTP, SCTP_STREAM_SCHEDULER, &scheduler,
sizeof(scheduler)) != 0) {
- PLOG(WARNING) << "Failed to set scheduler";
+ LOG_FIRST_N(WARNING, 1) << "Failed to set scheduler: " << strerror(errno)
+ << " [" << errno << "]";
}
}
@@ -89,7 +90,8 @@
sctp_priority.stream_value = priority;
if (setsockopt(fd(), IPPROTO_SCTP, SCTP_STREAM_SCHEDULER_VALUE,
&sctp_priority, sizeof(sctp_priority)) != 0) {
- PLOG(WARNING) << "Failed to set scheduler";
+ LOG_FIRST_N(WARNING, 1) << "Failed to set scheduler: " << strerror(errno)
+ << " [" << errno << "]";
}
}