From 27afecb3acaf4ebced6e1d2c7a006ba5fd12716b Mon Sep 17 00:00:00 2001 From: k32 <10274441+k32@users.noreply.github.com> Date: Thu, 4 Nov 2021 13:45:29 +0100 Subject: [PATCH] fix(emqx_connection): Introduce backpressure while sending data Fixes #5494 --- src/emqx_connection.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/emqx_connection.erl b/src/emqx_connection.erl index ab91c02b4..b8d1c485d 100644 --- a/src/emqx_connection.erl +++ b/src/emqx_connection.erl @@ -702,7 +702,7 @@ send(IoData, #state{transport = Transport, socket = Socket, channel = Channel}) ok = emqx_metrics:inc('bytes.sent', Oct), inc_counter(outgoing_bytes, Oct), emqx_congestion:maybe_alarm_conn_congestion(Socket, Transport, Channel), - case Transport:async_send(Socket, IoData, [nosuspend]) of + case Transport:async_send(Socket, IoData, []) of ok -> ok; Error = {error, _Reason} -> %% Send an inet_reply to postpone handling the error