From 77ec61e44f2ebde0d42893fd1ed887633421f255 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Fri, 18 Dec 2015 00:56:31 +0800 Subject: [PATCH] server check cb return during establish Signed-off-by: Andy Green --- lib/server-handshake.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/server-handshake.c b/lib/server-handshake.c index 805125c3..8c3e17c9 100644 --- a/lib/server-handshake.c +++ b/lib/server-handshake.c @@ -256,14 +256,15 @@ handshake_0405(struct lws_context *context, struct lws *wsi) /* notify user code that we're ready to roll */ if (wsi->protocol->callback) - wsi->protocol->callback(wsi, LWS_CALLBACK_ESTABLISHED, - wsi->user_space, + if (wsi->protocol->callback(wsi, LWS_CALLBACK_ESTABLISHED, + wsi->user_space, #ifdef LWS_OPENSSL_SUPPORT - wsi->ssl, + wsi->ssl, #else - NULL, + NULL, #endif - 0); + 0)) + goto bail; return 0;