summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_h1proto.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2020-03-06 18:28:54 +0300
committerIgor Sysoev <igor@sysoev.ru>2020-03-06 18:28:54 +0300
commit7935ea45436ea832344cec945d39a61ae91f2a69 (patch)
tree6ae820cdaf2204331300bb967090f23b61ed4d0a /src/nxt_h1proto.c
parent794248090a74f31cbfcf24ea8c835df2d4d21073 (diff)
downloadunit-7935ea45436ea832344cec945d39a61ae91f2a69.tar.gz
unit-7935ea45436ea832344cec945d39a61ae91f2a69.tar.bz2
Round robin upstream added.
Diffstat (limited to 'src/nxt_h1proto.c')
-rw-r--r--src/nxt_h1proto.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nxt_h1proto.c b/src/nxt_h1proto.c
index 8ce57893..1a6c537e 100644
--- a/src/nxt_h1proto.c
+++ b/src/nxt_h1proto.c
@@ -6,6 +6,7 @@
#include <nxt_router.h>
#include <nxt_http.h>
+#include <nxt_upstream.h>
#include <nxt_h1proto.h>
#include <nxt_websocket.h>
#include <nxt_websocket_header.h>
@@ -2004,7 +2005,7 @@ nxt_h1p_peer_connect(nxt_task_t *task, nxt_http_peer_t *peer)
c->read_timer.task = task;
c->write_timer.task = task;
c->socket.data = peer;
- c->remote = peer->sockaddr;
+ c->remote = peer->server->sockaddr;
c->socket.write_ready = 1;
c->write_state = &nxt_h1p_peer_connect_state;