]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
master: Fixed crash on deinit (maybe also on reload).
authorTimo Sirainen <tss@iki.fi>
Fri, 18 Jun 2010 15:27:45 +0000 (16:27 +0100)
committerTimo Sirainen <tss@iki.fi>
Fri, 18 Jun 2010 15:27:45 +0000 (16:27 +0100)
--HG--
branch : HEAD

src/master/service.c

index 5e6a01d6528bb4048719f902b2e53131e960df32..a16ee368d8e568bae357f843cce90e014b148e16 100644 (file)
@@ -620,6 +620,10 @@ static void service_drop_listener_connections(struct service *service)
                switch ((*listenerp)->type) {
                case SERVICE_LISTENER_UNIX:
                case SERVICE_LISTENER_INET:
+                       if ((*listenerp)->fd != -1) {
+                               /* already stopped listening */
+                               break;
+                       }
                        while ((fd = net_accept((*listenerp)->fd,
                                                NULL, NULL)) >= 0)
                                (void)close(fd);