danbarua / NEventSocket

A reactive FreeSwitch eventsocket library for Modern .Net
Mozilla Public License 2.0
74 stars 37 forks source link

Cannot access a disposed object. Object name: 'NEventSocket.InboundSocket'. #64

Open aistosi opened 7 years ago

aistosi commented 7 years ago

Hi guys,

We started using another freeswitch server and getting this error upon InboundSocket.Connect()

What could be the issue?

Thanks,

danbarua commented 7 years ago

Can you post some code that minimally reproduces the issue?

aistosi commented 7 years ago

It is actually the first line of the initialization code after declaration of the socket variable. We managed to fix this by using a different server so it is no longer an issue for us. I'll close the ticket if this doesn't ring a bell.

Dim goSocket As InboundSocket

goSocket = Await InboundSocket.Connect(ConfigurationManager.AppSettings("Phone_Server_IpAddress"), System.Configuration.ConfigurationManager.AppSettings("Phone_Port"), "ClueCon")

danbarua commented 7 years ago

If you plug in a logging library such as NLog then NEventSocket will route log messages to it (we'll automatically detect it if your application references the NLog dll.) If there are any issues, route TRACE level log messages to a file and there might be some information in there that will help diagnose the problem.

It could be a configuration or setup error with that server which means we cannot connect to it, but ObjectDisposedException is not very helpful and we could throw an error with a more descriptive message.