Skip to content

Commit 9ae7491

Browse files
io: notify Network Verifier on network issues
Signed-off-by: Craig Robb <craig.robb@gallagher.com>
1 parent 3f16e79 commit 9ae7491

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/flb_io.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,10 @@ int flb_io_net_connect(struct flb_connection *connection,
144144
connection->upstream->tcp_host,
145145
connection->upstream->tcp_port);
146146

147+
flb_connection_notify_error(connection, connection->upstream->tcp_host,
148+
connection->upstream->tcp_port, -1,
149+
"Couldn't connect to client proxy");
150+
147151
flb_socket_close(fd);
148152
connection->fd = -1;
149153
connection->event.fd = -1;
@@ -162,6 +166,10 @@ int flb_io_net_connect(struct flb_connection *connection,
162166

163167
if (ret == -1) {
164168
flb_socket_close(fd);
169+
170+
flb_connection_notify_error(connection, connection->upstream->tcp_host,
171+
connection->upstream->tcp_port, -1,
172+
"Error in keep-alive");
165173
connection->fd = -1;
166174
connection->event.fd = -1;
167175
return -1;

0 commit comments

Comments
 (0)