From f1bc82cd08a4ea66080f667631a0641971e822f1 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 5 Nov 2021 14:15:39 -0400 Subject: [PATCH] Fix logic of websocket handling Do not fall through to non-websocket path after handling the websocket --- confluent_server/confluent/httpapi.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/confluent_server/confluent/httpapi.py b/confluent_server/confluent/httpapi.py index 70438b4a..a287971c 100644 --- a/confluent_server/confluent/httpapi.py +++ b/confluent_server/confluent/httpapi.py @@ -478,8 +478,9 @@ def resourcehandler(env, start_response): if 'HTTP_SEC_WEBSOCKET_VERSION' in env: for rsp in wsock_handler(env, start_response): yield rsp - for rsp in resourcehandler_backend(env, start_response): - yield rsp + else: + for rsp in resourcehandler_backend(env, start_response): + yield rsp except Exception as e: tracelog.log(traceback.format_exc(), ltype=log.DataTypes.event, event=log.Events.stacktrace)