summaryrefslogtreecommitdiff
path: root/src/sockets.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2011-06-20 23:25:46 -0400
committerAdam <Adam@anope.org>2011-06-20 23:25:46 -0400
commit2667f9046ecd656f805d85397c27b8f19c864112 (patch)
treed2b62efaa017376d680c31a78894524a00c7b2e7 /src/sockets.cpp
parenta3d0ab3d09cbb636b680ab5015646ccb3200a70c (diff)
Cleaned up some of the logger code which fixes not logging debug logs to files etc when debug is enabled, and some other small things
Diffstat (limited to 'src/sockets.cpp')
-rw-r--r--src/sockets.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sockets.cpp b/src/sockets.cpp
index f255a4edf..7765d3066 100644
--- a/src/sockets.cpp
+++ b/src/sockets.cpp
@@ -282,10 +282,10 @@ ClientSocket *SocketIO::Accept(ListenSocket *s)
int newsock = accept(s->GetFD(), &conaddr.sa, &size);
#ifndef INVALID_SOCKET
-# define INVALID_SOCKET 0
+# define INVALID_SOCKET -1
#endif
- if (newsock > 0 && newsock != INVALID_SOCKET)
+ if (newsock >= 0 && newsock != INVALID_SOCKET)
return s->OnAccept(newsock, conaddr);
else
throw SocketException("Unable to accept connection: " + Anope::LastError());