kore

An easy to use, scalable and secure web application framework for writing web APIs in C.
Commits | Files | Refs | README | LICENSE | git clone https://git.kore.io/kore.git

commit 340bcb3b0d7218bc989bcb0c9167e2e9a6b80252
parent a95862783732513173fdf78b64a177422220b426
Author: Joris Vink <joris@coders.se>
Date:   Fri, 22 Jan 2016 15:07:33 +0100

Properly queue net events for tls-proxy example

Diffstat:
examples/tls-proxy/src/proxy.c | 10++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/examples/tls-proxy/src/proxy.c b/examples/tls-proxy/src/proxy.c @@ -166,7 +166,8 @@ client_setup(struct connection *c) int backend_handle_connect(struct connection *c) { - int ret; + int ret; + struct connection *src; /* We will get a write notification when we can progress. */ if (!(c->flags & CONN_WRITE_POSSIBLE)) @@ -208,7 +209,12 @@ backend_handle_connect(struct connection *c) kore_connection_start_idletimer(c); kore_platform_event_all(c->fd, c); - return (KORE_RESULT_OK); + /* Allow events from source now. */ + src = c->hdlr_extra; + kore_platform_event_all(src->fd, src); + + /* Now lets start. */ + return (c->handle(c)); } /*