minissdp.c: Dont try to close sockets with fd=-1

fixes #112
This commit is contained in:
Thomas Bernard 2015-04-28 09:01:30 +02:00
parent ba753120df
commit 2a08805783
1 changed files with 2 additions and 0 deletions

View File

@ -1169,6 +1169,8 @@ SendSSDPGoodbye(int * sockets, int n_sockets)
for(j=0; j<n_sockets; j++) for(j=0; j<n_sockets; j++)
{ {
if(sockets[j] < 0)
continue;
#ifdef ENABLE_IPV6 #ifdef ENABLE_IPV6
ipv6 = j & 1; ipv6 = j & 1;
if(ipv6) { if(ipv6) {