xmpp icon indicating copy to clipboard operation
xmpp copied to clipboard

System.ObjectDisposedException

Open payneauj opened this issue 8 years ago • 5 comments

Hello,

when connect method is called, i have got a System.ObjectDisposedException.

Here is my code :

XMPP.Client client = new XMPP.Client();
            client.Settings.Account = "payneauj@localhost";
            client.Settings.Id = "payneauj@localhost";
            client.Settings.Password = "test";
            client.Settings.Hostname = "localhost";

            client.Settings.Port = 5222;
            client.Settings.SSL = false;
            client.Settings.OldSSL = false;
            client.Settings.AuthenticationTypes = MechanismType.None;
            client.Settings.AuthenticationTypes |= MechanismType.DigestMD5;
            client.Settings.AuthenticationTypes |= MechanismType.SCRAM;
            client.Settings.UseKeepAlive = true;
            //client.OnConnected += OnClientConnected;
            //client.OnReceive += OnClientReceive;
            //client.OnError += xmppClient_OnError;
            //client.OnResourceBound += XmppClient_OnResourceBound;
            client.Connect();

Do you have any idea?

Thanks

payneauj avatar Apr 25 '16 16:04 payneauj

Do you have the stacktrace?

coder2000 avatar Apr 27 '16 23:04 coder2000

Hi I am getting the same issue.Below are the my code and I have also attach the screen shot for this.I am not found anny documentation also for this.

client.Settings.Hostname = "server ip address"; client.Settings.SSL = false; client.Settings.OldSSL = false; client.Settings.Port = 5222; client.Settings.Id = "sachin27@localhost"; client.Settings.Password = "qwerty";

             client.Connect();

error

ghost avatar May 05 '16 09:05 ghost

This bug occurs if you use the lib in an UWP project. Any chance that this gets fixed?

COM8 avatar Feb 15 '17 15:02 COM8

I did a little bit of research and found out that this issues origin is in Connection.cs in SocketConnect() like the following image shows:

I think it's related to following problem: http://stackoverflow.com/questions/13213258/windows-store-app-streamsoket-datareader-loadasync-objectdisposedexception (a null stream)

COM8 avatar Feb 15 '17 16:02 COM8

Unfortunately I do not have the Time to maintain this Code currently, I have last used it with Windows 8 and it possibly needs a few changes to make it run with UWP. That said I am happy to accept pull requests if somebody is willing to work things out. Apart from that there are a few forks that might be worh checking out and also the parent project from @coder2000 seems to have progressed in the recent years.

PaulFreund avatar Feb 16 '17 06:02 PaulFreund