Always call shutdown for a socket

This commit is contained in:
Maschell 2022-10-06 17:42:25 +02:00
parent 52766cdca1
commit 50600d3d82
2 changed files with 1 additions and 2 deletions

View File

@ -21,7 +21,6 @@ BackgroundThread::~BackgroundThread() {
mutex.lock();
if (this->serverSocket >= 0) {
cleanup_ftp();
::shutdown(this->serverSocket, SHUT_WR);
network_close(this->serverSocket);
this->serverSocket = -1;
}

View File

@ -147,7 +147,7 @@ int32_t network_close(int32_t s) {
if (s < 0) {
return -1;
}
shutdown(s, SHUT_RDWR);
int res = close(s);
if (res < 0) {