X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/53c1823aaef2eb8d547a8eed8cfe12fe7204ca79..39c6313308afb248b140d98b8052f1b484549df2:/projects/stargazer/plugins/configuration/sgconfig/rsconf.cpp diff --git a/projects/stargazer/plugins/configuration/sgconfig/rsconf.cpp b/projects/stargazer/plugins/configuration/sgconfig/rsconf.cpp index 421fc7bb..c0b7b325 100644 --- a/projects/stargazer/plugins/configuration/sgconfig/rsconf.cpp +++ b/projects/stargazer/plugins/configuration/sgconfig/rsconf.cpp @@ -250,7 +250,7 @@ while (pos < stgHdrLen) return -1; } int ret = recv(sock, &buf[pos], stgHdrLen - pos, 0); - if (ret < 0) + if (ret <= 0) { state = confHdr; return -1; @@ -310,7 +310,7 @@ while (pos < ADM_LOGIN_LEN) { int ret = recv(sock, &login[pos], ADM_LOGIN_LEN - pos, 0); - if (ret < 0) + if (ret <= 0) { // Error in network state = confHdr; @@ -359,7 +359,7 @@ while (pos < ADM_LOGIN_LEN) int ret = recv(sock, &loginS[pos], ADM_LOGIN_LEN - pos, 0); - if (ret < 0) + if (ret <= 0) { // Network error printfd(__FILE__, "recv error: '%s'\n", strerror(errno));