From f69bbf7f99791226746de0d201518104257976c2 Mon Sep 17 00:00:00 2001 From: defanor Date: Sat, 6 May 2017 08:46:05 +0300 Subject: Verify that the listener socket is closed It doesn't really affect functionality, but better to get an error message if something would go wrong. --- configure.ac | 2 +- tlsd.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 0a07b8f..16f311e 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ([2.69]) -AC_INIT(TLSd, 0.0.7, defanor@uberspace.net, tlsd, +AC_INIT(TLSd, 0.0.8, defanor@uberspace.net, tlsd, https://defanor.uberspace.net/projects/tlsd/) AM_INIT_AUTOMAKE([-Wall]) AC_CONFIG_SRCDIR([tlsd.c]) diff --git a/tlsd.c b/tlsd.c index db14bbf..3447021 100644 --- a/tlsd.c +++ b/tlsd.c @@ -730,7 +730,8 @@ int serve (options opt) if (cc.tcp_socket >= 0) conn_terminate(&cc, 1, opt.child_kill_signo); } - close(listener); + if (close(listener)) + err_msg(LOG_ERR, "Failed to close the listener socket"); gnutls_certificate_free_credentials(x509_cred); gnutls_dh_params_deinit(dh_params); gnutls_global_deinit(); -- cgit v1.2.3