projects
/
umurmur.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e6ca07c
)
Close new connections that fail for e.g. ban reason.
author
Martin Johansson
<martin@fatbob.nu>
Sat, 25 Feb 2012 19:02:11 +0000
(20:02 +0100)
committer
Martin Johansson
<martin@fatbob.nu>
Sat, 25 Feb 2012 19:02:11 +0000
(20:02 +0100)
src/server.c
patch
|
blob
|
history
diff --git
a/src/server.c
b/src/server.c
index 4f466d77e7c35637dfcb42fdc4307860ff6a9f56..77e59aa3dff6b6139a0b198c59516a9147224740 100644
(file)
--- a/
src/server.c
+++ b/
src/server.c
@@
-173,7
+173,8
@@
void Server_run()
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) {