mirror of
https://github.com/wiiu-env/ftpiiu_plugin.git
synced 2025-01-11 19:29:09 +01:00
Always call shutdown for a socket
This commit is contained in:
parent
52766cdca1
commit
50600d3d82
@ -21,7 +21,6 @@ BackgroundThread::~BackgroundThread() {
|
|||||||
mutex.lock();
|
mutex.lock();
|
||||||
if (this->serverSocket >= 0) {
|
if (this->serverSocket >= 0) {
|
||||||
cleanup_ftp();
|
cleanup_ftp();
|
||||||
::shutdown(this->serverSocket, SHUT_WR);
|
|
||||||
network_close(this->serverSocket);
|
network_close(this->serverSocket);
|
||||||
this->serverSocket = -1;
|
this->serverSocket = -1;
|
||||||
}
|
}
|
||||||
|
@ -147,7 +147,7 @@ int32_t network_close(int32_t s) {
|
|||||||
if (s < 0) {
|
if (s < 0) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
shutdown(s, SHUT_RDWR);
|
||||||
int res = close(s);
|
int res = close(s);
|
||||||
|
|
||||||
if (res < 0) {
|
if (res < 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user