From 7f76c3ab1be32526229f5137a59a9dc1ebfeb3e3 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Fri, 9 Dec 2022 19:26:55 +0200 Subject: [PATCH] Emit signal_end_of_file after clearing events This ensures that the state remains consistent even if a slot throws. --- source/net/clientsocket.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/net/clientsocket.cpp b/source/net/clientsocket.cpp index e07b1f6..9cabeef 100644 --- a/source/net/clientsocket.cpp +++ b/source/net/clientsocket.cpp @@ -85,8 +85,8 @@ size_t ClientSocket::do_read(char *buf, size_t size) if(ret==0 && !eof_flag) { eof_flag = true; - signal_end_of_file.emit(); set_socket_events(S_NONE); + signal_end_of_file.emit(); } return ret; -- 2.45.2