From: Mikko Rasa Date: Fri, 9 Dec 2022 17:26:55 +0000 (+0200) Subject: Emit signal_end_of_file after clearing events X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=7f76c3ab1be32526229f5137a59a9dc1ebfeb3e3;p=libs%2Fnet.git Emit signal_end_of_file after clearing events This ensures that the state remains consistent even if a slot throws. --- 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;