Close UDP socket after error.
This commit is contained in:
parent
90fde6e97d
commit
c26de9f435
1 changed files with 4 additions and 0 deletions
|
@ -900,7 +900,11 @@ int main(int argc, char **argv)
|
||||||
|
|
||||||
} else if (len < 0) { /* Got an error or signal while reading */
|
} else if (len < 0) { /* Got an error or signal while reading */
|
||||||
if (errno != EINTR) /* */
|
if (errno != EINTR) /* */
|
||||||
|
{
|
||||||
logerror("Receive error from UDP channel");
|
logerror("Receive error from UDP channel");
|
||||||
|
close(nfd);
|
||||||
|
nfd= -1;
|
||||||
|
}
|
||||||
|
|
||||||
} else { /* (len == 0) Channel has been closed */
|
} else { /* (len == 0) Channel has been closed */
|
||||||
logerror("UDP channel has closed");
|
logerror("UDP channel has closed");
|
||||||
|
|
Loading…
Reference in a new issue