diff options
author | Toni Uhlig <matzeton@googlemail.com> | 2021-08-05 01:14:04 +0200 |
---|---|---|
committer | Toni Uhlig <matzeton@googlemail.com> | 2021-08-05 02:02:51 +0200 |
commit | 6faded3cc7084cb898773dafc1ca9422242f9c81 (patch) | |
tree | 7beae11228ee671362af1e88f397bd80ead59e3b /nDPId.c | |
parent | d48508b4afe5f3a22c2dda733ee13554d5c5ae60 (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.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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) |