diff options
author | Werner Koch <wk@gnupg.org> | 2016-11-29 20:35:10 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2016-11-29 20:35:23 +0100 |
commit | aa6ab9e0bc67fe9ce5601047e84ea4a875e8eb64 (patch) | |
tree | 3d341b20bcaa6734d8c3f066c6765fe7539de43e /agent | |
parent | agent,dirmngr: Handle corner case in shutdown mode. (diff) | |
download | gnupg2-aa6ab9e0bc67fe9ce5601047e84ea4a875e8eb64.tar.xz gnupg2-aa6ab9e0bc67fe9ce5601047e84ea4a875e8eb64.zip |
agent,dirmngr: Tiny restructuring.
* agent/gpg-agent.c (handle_connections): Add a comment.
* dirmngr/dirmngr.c (main): Move assuan_sock_close of the listening
socket to ...
(handle_connections): here. Add a comment why we keep the
listening socket open during a shutdown.
Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'agent')
-rw-r--r-- | agent/gpg-agent.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/agent/gpg-agent.c b/agent/gpg-agent.c index c2052c9ab..710357c72 100644 --- a/agent/gpg-agent.c +++ b/agent/gpg-agent.c @@ -2829,7 +2829,12 @@ handle_connections (gnupg_fd_t listen_fd, break; /* ready */ /* Do not accept new connections but keep on running the - loop to cope with the timer events. */ + * loop to cope with the timer events. + * + * Note that we do not close the listening socket because a + * client trying to connect to that socket would instead + * restart a new dirmngr instance - which is unlikely the + * intention of a shutdown. */ FD_ZERO (&fdset); nfd = -1; if (my_inotify_fd != -1) |