summaryrefslogtreecommitdiff
path: root/nDPId.c
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2021-08-05 01:14:04 +0200
committerToni Uhlig <matzeton@googlemail.com>2021-08-05 02:02:51 +0200
commit6faded3cc7084cb898773dafc1ca9422242f9c81 (patch)
tree7beae11228ee671362af1e88f397bd80ead59e3b /nDPId.c
parentd48508b4afe5f3a22c2dda733ee13554d5c5ae60 (diff)
Improved and Fixed another buffering issue caused by removing an outgoing fd too early from epoll queue (EPOLLOUT).
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'nDPId.c')
-rw-r--r--nDPId.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/nDPId.c b/nDPId.c
index d4b029fc1..4d46aa5b3 100644
--- a/nDPId.c
+++ b/nDPId.c
@@ -1668,6 +1668,12 @@ static int connect_to_json_socket(struct nDPId_reader_thread * const reader_thre
return 1;
}
+ int opt = NETWORK_BUFFER_MAX_SIZE * 16;
+ if (setsockopt(reader_thread->json_sockfd, SOL_SOCKET, SO_SNDBUF, &opt, sizeof(opt)) < 0)
+ {
+ /* Nop. */
+ }
+
saddr.sun_family = AF_UNIX;
if (snprintf(saddr.sun_path, sizeof(saddr.sun_path), "%s", nDPId_options.json_sockpath) < 0 ||
connect(reader_thread->json_sockfd, (struct sockaddr *)&saddr, sizeof(saddr)) < 0)