File 1016-erts-Add-comment-about-send-timeout-clearing-busy-po.patch of Package erlang

From db13f8883721c7a217a80cb2c73a1e419f462d83 Mon Sep 17 00:00:00 2001
From: Sverker Eriksson <sverker@erlang.org>
Date: Fri, 30 Oct 2020 13:59:01 +0100
Subject: [PATCH] erts: Add comment about send timeout clearing busy port

---
 erts/emulator/drivers/common/inet_drv.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/erts/emulator/drivers/common/inet_drv.c b/erts/emulator/drivers/common/inet_drv.c
index efb9cbdb77..301a133d3a 100644
--- a/erts/emulator/drivers/common/inet_drv.c
+++ b/erts/emulator/drivers/common/inet_drv.c
@@ -10499,6 +10499,11 @@ static void tcp_inet_send_timeout(ErlDrvData e, ErlDrvTermData dummy)
     if (desc->send_timeout_close) {
         tcp_desc_close(desc);
     }
+    /* Q: Why not keep port busy as send queue may still be full (ERL-1390)?
+     *
+     * A: If kept busy, a following send call would hang without a timeout
+     *    as it would get suspended in erlang:port_command waiting on busy port.
+     */
 }
 
 /*
-- 
2.26.2

openSUSE Build Service is sponsored by