diff options
author | Přemysl Janouch <p.janouch@gmail.com> | 2017-02-06 20:48:14 +0100 |
---|---|---|
committer | Přemysl Janouch <p.janouch@gmail.com> | 2017-02-06 20:48:14 +0100 |
commit | b85d1d74a435ca706f7285d47bbfd8b48e8778e1 (patch) | |
tree | cd0d65c0947b75fea074c29d2bd75c503079ddb8 /demo-json-rpc-server.c | |
parent | d35e733c6ef9ac43639c1d1361446ecb3e94b6f6 (diff) | |
download | json-rpc-shell-b85d1d74a435ca706f7285d47bbfd8b48e8778e1.tar.gz json-rpc-shell-b85d1d74a435ca706f7285d47bbfd8b48e8778e1.tar.xz json-rpc-shell-b85d1d74a435ca706f7285d47bbfd8b48e8778e1.zip |
Don't respond to notifications
Diffstat (limited to 'demo-json-rpc-server.c')
-rw-r--r-- | demo-json-rpc-server.c | 5 |
1 files 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; } |