diff options
author | Přemysl Janouch <p.janouch@gmail.com> | 2017-02-06 21:12:12 +0100 |
---|---|---|
committer | Přemysl Janouch <p.janouch@gmail.com> | 2017-02-06 21:12:12 +0100 |
commit | 06e066a49127115b6396b60b52ecd9127baf069d (patch) | |
tree | 70cf88ec8c0d3ff6f55f1d40cc57875fbfbadc26 | |
parent | 1be02128e38dd6afa2bd3c535d9b47e437d50785 (diff) | |
download | json-rpc-shell-06e066a49127115b6396b60b52ecd9127baf069d.tar.gz json-rpc-shell-06e066a49127115b6396b60b52ecd9127baf069d.tar.xz json-rpc-shell-06e066a49127115b6396b60b52ecd9127baf069d.zip |
WebSocket: avoid closing an invalid FD
-rw-r--r-- | json-rpc-shell.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/json-rpc-shell.c b/json-rpc-shell.c index 3e5f18d..0fbf1ae 100644 --- a/json-rpc-shell.c +++ b/json-rpc-shell.c @@ -2126,7 +2126,7 @@ backend_ws_connect (struct ws_context *self, struct error **e) result = true; fail_2: - if (!result) + if (!result && self->server_fd != -1) { xclose (self->server_fd); self->server_fd = -1; |