From 25290d18ea9208266a51008417718e1d826a8a5a Mon Sep 17 00:00:00 2001 From: Craig Edwards Date: Thu, 19 Dec 2024 22:16:45 +0000 Subject: [PATCH] fix: make sure write events go out as soon as they can --- src/dpp/sslclient.cpp | 1 + src/dpp/wsclient.cpp | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/dpp/sslclient.cpp b/src/dpp/sslclient.cpp index 89e7242e29..998a0fa2e8 100644 --- a/src/dpp/sslclient.cpp +++ b/src/dpp/sslclient.cpp @@ -247,6 +247,7 @@ void ssl_client::socket_write(const std::string_view data) { */ std::lock_guard lock(out_mutex); obuffer += data; + owner->socketengine->inplace_modify_fd(sfd, WANT_WRITE); } void ssl_client::one_second_timer() { diff --git a/src/dpp/wsclient.cpp b/src/dpp/wsclient.cpp index 4d382f968e..2dd4f1fedc 100644 --- a/src/dpp/wsclient.cpp +++ b/src/dpp/wsclient.cpp @@ -131,8 +131,6 @@ void websocket_client::write(const std::string_view data, ws_opcode _opcode) ssl_client::socket_write(header); ssl_client::socket_write(data); } - - owner->socketengine->inplace_modify_fd(sfd, WANT_WRITE); } bool websocket_client::handle_buffer(std::string& buffer)