-/* Copyright (C) 2009-2010, Martin Johansson <martin@fatbob.nu>
- Copyright (C) 2005-2010, Thorvald Natvig <thorvald@natvig.com>
+/* Copyright (C) 2009-2011, Martin Johansson <martin@fatbob.nu>
+ Copyright (C) 2005-2011, Thorvald Natvig <thorvald@natvig.com>
All rights reserved.
setsockopt(tcpfd, IPPROTO_TCP, TCP_NODELAY, (char *) &flag, sizeof(int));
Log_debug("Connection from %s port %d\n", inet_ntoa(remote.sin_addr),
ntohs(remote.sin_port));
- Client_add(tcpfd, &remote);
+ if (Client_add(tcpfd, &remote) < 0)
+ close(tcpfd);
}
if (pollfds[UDP_SOCK].revents) {