aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2017-02-06 18:30:02 +0100
committerPřemysl Janouch <p.janouch@gmail.com>2017-02-06 18:30:02 +0100
commit2986f6cda0a7834d6ad5d7e927b58dd5ba4a2502 (patch)
tree9b88946d379510169e0016653ca453baece49537
parentc4ebf2ccd57c3c095b58de5f6c33019177306712 (diff)
downloadjson-rpc-shell-2986f6cda0a7834d6ad5d7e927b58dd5ba4a2502.tar.gz
json-rpc-shell-2986f6cda0a7834d6ad5d7e927b58dd5ba4a2502.tar.xz
json-rpc-shell-2986f6cda0a7834d6ad5d7e927b58dd5ba4a2502.zip
Fix segfault on client destruction etc.
-rw-r--r--demo-json-rpc-server.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/demo-json-rpc-server.c b/demo-json-rpc-server.c
index 11ebfdf..47622ba 100644
--- a/demo-json-rpc-server.c
+++ b/demo-json-rpc-server.c
@@ -1877,6 +1877,7 @@ client_init (EV_P_ struct client *self, int sock_fd)
struct server_context *ctx = ev_userdata (loop);
memset (self, 0, sizeof *self);
+ self->ctx = ctx;
write_queue_init (&self->write_queue);
set_blocking (sock_fd, false);