WebSocket: avoid closing an invalid FD

This commit is contained in:
Přemysl Eric Janouch 2017-02-06 21:12:12 +01:00
parent 1be02128e3
commit 06e066a491
Signed by: p
GPG Key ID: B715679E3A361BE6

View File

@ -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;