projects
/
privoxy.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix spelling in Purpose line. Patch submitted by Simon Ruderich.
[privoxy.git]
/
jbsockets.c
diff --git
a/jbsockets.c
b/jbsockets.c
index
2fe622b
..
6f66e1c
100644
(file)
--- a/
jbsockets.c
+++ b/
jbsockets.c
@@
-1,4
+1,4
@@
-const char jbsockets_rcs[] = "$Id: jbsockets.c,v 1.4
3 2007/06/01 18:16:36
fabiankeil Exp $";
+const char jbsockets_rcs[] = "$Id: jbsockets.c,v 1.4
4 2007/09/15 13:01:31
fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/jbsockets.c,v $
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/jbsockets.c,v $
@@
-35,6
+35,11
@@
const char jbsockets_rcs[] = "$Id: jbsockets.c,v 1.43 2007/06/01 18:16:36 fabian
*
* Revisions :
* $Log: jbsockets.c,v $
*
* Revisions :
* $Log: jbsockets.c,v $
+ * Revision 1.44 2007/09/15 13:01:31 fabiankeil
+ * Increase listen() backlog to SOMAXCONN (or 128) to decrease
+ * chances of dropped connections under load. Problem reported
+ * and fix suggested by nobody in BR#1795281.
+ *
* Revision 1.43 2007/06/01 18:16:36 fabiankeil
* Use the same mutex for gethostbyname() and gethostbyaddr() to prevent
* deadlocks and crashes on OpenBSD and possibly other OS with neither
* Revision 1.43 2007/06/01 18:16:36 fabiankeil
* Use the same mutex for gethostbyname() and gethostbyaddr() to prevent
* deadlocks and crashes on OpenBSD and possibly other OS with neither
@@
-306,10
+311,8
@@
const char jbsockets_h_rcs[] = JBSOCKETS_H_VERSION;
*/
#define MAX_DNS_RETRIES 10
*/
#define MAX_DNS_RETRIES 10
-#ifndef SOMAXCONN
-/* XXX: Might not be necessary. */
-#define SOMAXCONN 128
-#endif
+#define MAX_LISTEN_BACKLOG 128
+
/*********************************************************************
*
/*********************************************************************
*
@@
-687,7
+690,7
@@
int bind_port(const char *hostnam, int portnum, jb_socket *pfd)
}
}
}
}
- while (listen(fd,
SOMAXCONN
) == -1)
+ while (listen(fd,
MAX_LISTEN_BACKLOG
) == -1)
{
if (errno != EINTR)
{
{
if (errno != EINTR)
{