aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-05-07 18:29:40 +0200
committerMattias Andrée <maandree@operamail.com>2014-05-07 18:29:40 +0200
commit28f14118a5c56252df803c364848acb25680a991 (patch)
treeccf36654ff86a8f8e7546335906a7e045153b1d3
parentsend to clients (does not implement modifiers yet) (diff)
downloadmds-28f14118a5c56252df803c364848acb25680a991.tar.gz
mds-28f14118a5c56252df803c364848acb25680a991.tar.bz2
mds-28f14118a5c56252df803c364848acb25680a991.tar.xz
m
Signed-off-by: Mattias Andrée <maandree@operamail.com>
-rw-r--r--src/mds-server.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mds-server.c b/src/mds-server.c
index 7bd79df..0dc6106 100644
--- a/src/mds-server.c
+++ b/src/mds-server.c
@@ -1054,6 +1054,11 @@ void multicast_message(char* message, size_t length)
size_t sent;
n = length;
+ /* Skip if the client has closed. */
+ if (client->open == 0)
+ continue;
+
+ /* Send the message. */
with_mutex(client->mutex,
while (n > 0)
{
@@ -1068,6 +1073,7 @@ void multicast_message(char* message, size_t length)
}
);
+ /* Wait for a reply. */
if ((n > 0) && client_.modifying)
{
/* TODO */