-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
What steps will reproduce the problem?
1. Create the clients
foreach (JPSettings.ChatUser u in
JPSettings.Instance.ChatUsers)
{
JabberClient client = new JabberClient();
client.User = u.username;
client.Password = u.password;
client.Server = JPSettings.Instance.JabberServerHostname;
client.Port = JPSettings.Instance.JabberServerPort;
client.AutoLogin = true;
client.AutoReconnect = 1;
client.AutoPresence = false;
client.Resource = client.User;
client.KeepAlive = 10;
client.PlaintextAuth = true;
client.OnInvalidCertificate += new
System.Net.Security.RemoteCertificateValidationCallback(
client_OnInvalidCertificate);
client.OnMessage += new MessageHandler(client_OnMessage);
client.OnPresence += new
PresenceHandler(client_OnPresence);
client.OnError += new
bedrock.ExceptionHandler(client_OnError);
client.OnStreamError += new
jabber.protocol.ProtocolHandler(
client_OnStreamError);
client.OnAuthError += new jabber.protocol.ProtocolHandler(
client_OnAuthError);
clients.Add(client);
}
2. Connect them
public override void OnChatUserLogin(ChatUser user)
{
user.PresenceChanged += new EventHandler(user_PresenceChanged);
JabberClient client = FindJabberClient(user.Username);
if (client == null) return;
client.Connect();
try
{
SetUserPresence(user);
}
catch (Exception e)
{
throw new Exception("Failed to set user presence for user "
+
user.Username, e);
}
}
3. OnChatUserLogin is called in a loop for every users. SetUserPresence
calls JabberClient.Presence().
4. My server is OpenFire 3.6.2
What is the expected output? What do you see instead?
I expect the chat users (I have two) to be logged in.
Sometimes they are.
Sometimes only one of them is.
Sometimes one of them got disconnected after exchanging some messages.
Sometimes I get the OnError event fired with Object reference not set to an
object.
Sometimes I get the OnAuthError event fired.
Sometimes they say that xml tags are not matching.
Sometimes I get an Assertion error (see attached file).
What version of the product are you using? On what operating system?
I have this problem both with the current release And the revision 760.
Please provide any additional information below.
Both the server and my app are on my local machine.
I strongly suspect a parallel programming issue.
Original issue reported on code.google.com by michel.y...@vtxmail.ch
on 1 May 2009 at 7:53
Attachments: