From b08da6a31c8183dc4bc6f41066dbfc9159a94f18 Mon Sep 17 00:00:00 2001 From: Martin Johansson Date: Wed, 7 Sep 2011 21:57:36 +0200 Subject: [PATCH] Fix for unneccesary fatal exit when client is disconnected due to SSL error. --- src/client.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/client.c b/src/client.c index e190a0b..2ad53ba 100644 --- a/src/client.c +++ b/src/client.c @@ -354,10 +354,10 @@ int Client_read_fd(int fd) break; } } - if (client == NULL) - Log_fatal("No client found for fd %d", fd); - - return Client_read(client); + if (client != NULL) + return Client_read(client); + else + return -1; } int Client_read(client_t *client) @@ -457,10 +457,10 @@ int Client_write_fd(int fd) break; } } - if (client == NULL) - Log_fatal("No client found for fd %d", fd); - Client_write(client); - return 0; + if (client != NULL) + return Client_write(client); + else + return -1; } int Client_write(client_t *client) -- 2.30.2