X-Git-Url: http://git.pk910.de/?p=ircu2.10.12-pk.git;a=blobdiff_plain;f=ircd%2Fs_auth.c;fp=ircd%2Fs_auth.c;h=95e7d5ca1741f7c17f267c68aeeb53933e3b0b27;hp=924bd50ab13dcc36df46936301348155a327312d;hb=389b4c485cac5cf8deff89e381020f2a38f1ad34;hpb=894ccd3b8d5acb0067562d26bf72228d3e617203 diff --git a/ircd/s_auth.c b/ircd/s_auth.c index 924bd50..95e7d5c 100644 --- a/ircd/s_auth.c +++ b/ircd/s_auth.c @@ -1373,19 +1373,19 @@ static void iauth_disconnect(struct IAuth *iauth) if (iauth == NULL) return; - /* Close main socket. */ - if (s_fd(i_socket(iauth)) != -1) { - close(s_fd(i_socket(iauth))); - socket_del(i_socket(iauth)); - s_fd(i_socket(iauth)) = -1; - } - /* Close error socket. */ if (s_fd(i_stderr(iauth)) != -1) { close(s_fd(i_stderr(iauth))); socket_del(i_stderr(iauth)); s_fd(i_stderr(iauth)) = -1; } + + /* Close main socket. */ + if (s_fd(i_socket(iauth)) != -1) { + close(s_fd(i_socket(iauth))); + socket_del(i_socket(iauth)); + s_fd(i_socket(iauth)) = -1; + } } /** Close all %IAuth connections marked as closing. */