Close UDP socket after error.

This commit is contained in:
Philip Homburg 2007-08-15 12:50:24 +00:00
parent 90fde6e97d
commit c26de9f435

View file

@ -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");