From 3102feb56c2274313e40d1d13cb2761f7796bb9b Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Sun, 17 Apr 2016 11:47:22 +0100 Subject: abstract_tcp_server2: fix send queue limit warning spam When the send queue limit is reached, it is likely to not drain any time soon. If we call close on the connection, it will stay alive, waiting for the queue to drain before actually closing, and will hit that check again and again. Since the queue size limit is the reason we're closing in the first place, we call shutdown directly. --- contrib/epee/include/net/abstract_tcp_server2.inl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'contrib/epee/include/net/abstract_tcp_server2.inl') diff --git a/contrib/epee/include/net/abstract_tcp_server2.inl b/contrib/epee/include/net/abstract_tcp_server2.inl index 416a24739..ca9429c91 100644 --- a/contrib/epee/include/net/abstract_tcp_server2.inl +++ b/contrib/epee/include/net/abstract_tcp_server2.inl @@ -514,7 +514,7 @@ PRAGMA_WARNING_DISABLE_VS(4355) if (retry > retry_limit) { _erro("send que size is more than ABSTRACT_SERVER_SEND_QUE_MAX_COUNT(" << ABSTRACT_SERVER_SEND_QUE_MAX_COUNT << "), shutting down connection"); // _dbg1_c("net/sleep", "send que size is more than ABSTRACT_SERVER_SEND_QUE_MAX_COUNT(" << ABSTRACT_SERVER_SEND_QUE_MAX_COUNT << "), shutting down connection"); - close(); + shutdown(); return false; } } -- cgit v1.2.3