diff options
-rw-r--r-- | server.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/server.c b/server.c index 3836f5d..29beabf 100644 --- a/server.c +++ b/server.c @@ -114,8 +114,6 @@ static struct Client *clientAdd(int fd) { return client; } -static void clientRemove(struct Client *client); - static bool clientSend(const struct Client *client, const struct ServerMessage *msg) { ssize_t len = send(client->fd, msg, sizeof(*msg), 0); if (len < 0) return false; @@ -130,16 +128,11 @@ static bool clientSend(const struct Client *client, const struct ServerMessage * } static void clientCast(const struct Client *origin, const struct ServerMessage *msg) { -retry: for (struct Client *client = clientHead; client; client = client->next) { if (client == origin) continue; if (client->tileX != origin->tileX) continue; if (client->tileY != origin->tileY) continue; - - if (!clientSend(client, msg)) { - clientRemove(client); - goto retry; - } + clientSend(client, msg); } } |