summaryrefslogtreecommitdiff
path: root/server/main.c
diff options
context:
space:
mode:
authorGravatar Jeffrey Hutzelman <jhutz@cmu.edu>2013-02-24 20:35:02 -0500
committerGravatar Jeffrey Hutzelman <jhutz@cmu.edu>2013-03-18 20:31:14 -0400
commitc195dcb983c774ead4320476fe6b4c362ebe351e (patch)
treed129f9ac5086a02408567c141b91627e33e6eb94 /server/main.c
parent382ec261b4cb8c7b9a6bec7cccf126425f116417 (diff)
Don't send to realms with no servers
When we are using c-ares to resolve otherrealm server names asynchronously, there is a period of time during startup during which a realm may have no servers whose names we have successfully resolved. This can also happen when a realm is added, or when servers for a realm are deleted, and even without asynchronous resolution, it can happen if we are having trouble resolving names. We now avoid trying to send notices to realms for which there are no usable servers (that is, servers which are not deleted, not marked nosend, and whose names have been resolved). Currently, when this happens, the notice to be sent is just dropped on the floor. Arguably, we should manage a queue of packets waiting to be sent to such a realm, and resend them if we ever discover a usable server. But that would be complicated. In addition, since we are basically never ready to send realm wakeups when processing the realm.list, they are now deferred until the first server's name has been resolved (and then, until the timer queue is processed). This has the additional effect of causing wakeups to be sent for realms which appear during a realm.list reload.
Diffstat (limited to 'server/main.c')
-rw-r--r--server/main.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/server/main.c b/server/main.c
index 8e326d9..0186b17 100644
--- a/server/main.c
+++ b/server/main.c
@@ -258,8 +258,6 @@ main(int argc,
gettimeofday(&t_local, NULL);
uptime = NOW;
- realm_wakeup();
-
for (;;) {
if (doreset)
do_reset();