Commit 958bf245 authored by Dustin Lundquist's avatar Dustin Lundquist

Send abort message when closing socket

parent 25010ca4
...@@ -482,6 +482,10 @@ initiate_server_connect(struct Connection *con, struct ev_loop *loop) { ...@@ -482,6 +482,10 @@ initiate_server_connect(struct Connection *con, struct ev_loop *loop) {
strerror(errno), strerror(errno),
display_sockaddr(&con->client.addr, client, sizeof(client))); display_sockaddr(&con->client.addr, client, sizeof(client)));
buffer_push(con->server.buffer,
con->listener->protocol->abort_message,
con->listener->protocol->abort_message_len);
con->state = SERVER_CLOSED; con->state = SERVER_CLOSED;
return; return;
} }
...@@ -499,6 +503,10 @@ initiate_server_connect(struct Connection *con, struct ev_loop *loop) { ...@@ -499,6 +503,10 @@ initiate_server_connect(struct Connection *con, struct ev_loop *loop) {
display_sockaddr(&con->server.addr, server, sizeof(server)), display_sockaddr(&con->server.addr, server, sizeof(server)),
strerror(errno)); strerror(errno));
buffer_push(con->server.buffer,
con->listener->protocol->abort_message,
con->listener->protocol->abort_message_len);
con->state = SERVER_CLOSED; con->state = SERVER_CLOSED;
return; return;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment