proper freeng after udpsocket shutdown

This commit is contained in:
Dhanya Maliakal 2015-08-05 12:08:28 +02:00
parent a26cbced57
commit a4a0ea508e
2 changed files with 3 additions and 0 deletions

View File

@ -443,6 +443,8 @@ typedef struct
void ShutDownSocket(){ void ShutDownSocket(){
while(!shutdown(socketDescriptor, SHUT_RDWR)); while(!shutdown(socketDescriptor, SHUT_RDWR));
close(socketDescriptor);
socketDescriptor = -1;
}; };

View File

@ -1077,6 +1077,7 @@ int UDPStandardImplementation::createUDPSockets(){
#ifdef VERBOSE #ifdef VERBOSE
cprintf(BG_RED,"Could not create UDP socket on port %d error: %d\n", port[i], iret); cprintf(BG_RED,"Could not create UDP socket on port %d error: %d\n", port[i], iret);
#endif #endif
shutDownUDPSockets();
return FAIL; return FAIL;
} }
} }