aboutsummaryrefslogtreecommitdiffstats
path: root/src/rspamd_proxy.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-08-28 18:51:19 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-08-28 18:51:19 +0100
commit6ae3b5a35a778fe532ce1964d90f85c36f99ffc9 (patch)
tree15a57345fa0532ad8edeeae3fab7549933405ad2 /src/rspamd_proxy.c
parenta34483b4c781eca122cac577d59dbed0938ff887 (diff)
downloadrspamd-6ae3b5a35a778fe532ce1964d90f85c36f99ffc9.tar.gz
rspamd-6ae3b5a35a778fe532ce1964d90f85c36f99ffc9.zip
[Minor] Do not set NODELAY on Unix sockets
Diffstat (limited to 'src/rspamd_proxy.c')
-rw-r--r--src/rspamd_proxy.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/rspamd_proxy.c b/src/rspamd_proxy.c
index 3345bd785..5e00dca65 100644
--- a/src/rspamd_proxy.c
+++ b/src/rspamd_proxy.c
@@ -2037,10 +2037,14 @@ proxy_accept_socket (gint fd, short what, void *arg)
#define SOL_TCP IPPROTO_TCP
#endif
- gint sopt = 1;
+ if (rspamd_inet_address_get_af (addr) != AF_UNIX) {
+ gint sopt = 1;
- if (setsockopt (nfd, SOL_TCP, TCP_NODELAY, &sopt, sizeof (sopt)) == -1) {
- msg_warn_session ("cannot set TCP_NODELAY: %s", strerror (errno));
+ if (setsockopt (nfd, SOL_TCP, TCP_NODELAY, &sopt, sizeof (sopt)) ==
+ -1) {
+ msg_warn_session ("cannot set TCP_NODELAY: %s",
+ strerror (errno));
+ }
}
#endif