From b85d1d74a435ca706f7285d47bbfd8b48e8778e1 Mon Sep 17 00:00:00 2001 From: Přemysl Janouch Date: Mon, 6 Feb 2017 20:48:14 +0100 Subject: Don't respond to notifications --- demo-json-rpc-server.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/demo-json-rpc-server.c b/demo-json-rpc-server.c index 2e855bf..85b54a9 100644 --- a/demo-json-rpc-server.c +++ b/demo-json-rpc-server.c @@ -2149,8 +2149,9 @@ client_ws_on_message (void *user_data, struct str response; str_init (&response); process_json_rpc (self->client.ctx, data, len, &response); - ws_handler_send (&self->handler, - WS_OPCODE_TEXT, response.str, response.len); + if (response.len) + ws_handler_send (&self->handler, + WS_OPCODE_TEXT, response.str, response.len); str_free (&response); return true; } -- cgit v1.2.3-70-g09d2