From ebc2a8ef21bd90e753cf9b88ea186b0c87775de3 Mon Sep 17 00:00:00 2001 From: fcolin Date: Fri, 12 Mar 2010 16:40:27 +0000 Subject: mise en conformité des messages ping /pong start regexpid a 0 catch plantage NULL ref Correction pb a la fermeture d'ivy --- Ivy/Ivy.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'Ivy/Ivy.cs') diff --git a/Ivy/Ivy.cs b/Ivy/Ivy.cs index 1dfd967..922bb27 100644 --- a/Ivy/Ivy.cs +++ b/Ivy/Ivy.cs @@ -198,7 +198,7 @@ namespace IvyBus private static readonly string DefaultDomain = "127.0.0.1:" + DefaultPort; internal int protocolVersion = 3; private static bool debugProtocol; // false by default runtime - private static int serial; /* an unique ID for each regexp */ // 0 by default runtime + private static int serial = -1; /* an unique ID for each regexp */ // -1 to start numbering at 0 private MyTcpListener app; private List watchers; private Thread serverThread; // to ensure quick communication of the end @@ -887,9 +887,12 @@ namespace IvyBus /// public int Ping(string target, string message) { + int id = (int)DateTime.Now.Ticks; ReadOnlyCollection v = GetClientsByName(target); foreach (IvyClient clnt in v) - clnt.stream.TokenPing(message); + { + clnt.stream.TokenPing(id, message); + } return v.Count; } -- cgit v1.1