Greetings,
Unhandled Excpetion and application crash occurs (only) when I switch network meanwhile application is rurning. This can be switching between wireless networks, wireless to lan or lan to wireless.
This happens both in case of Beacon but also for XPublisher & Subscriber. NetMQPoller is being used in all cases, i.e. inconjunction with XPublisherSocket, SubscriberSocket, and NetMQBeacon.
Any help on best way to monitor and act on network change and reset proparly to the new network would greatly be appreciated.
Example of Exception:
The process was terminated due to an unhandled exception. Exception Info: System.Net.Sockets.SocketException
at System.Net.Sockets.Socket.SendTo(Byte[], Int32, Int32, System.Net.Sockets.SocketFlags, System.Net.EndPoint)
at NetMQ.NetMQBeacon+Shim.SendUdpFrame(NetMQ.NetMQFrame)
at NetMQ.NetMQBeacon+Shim.PingElapsed(System.Object, NetMQ.NetMQTimerEventArgs)
at NetMQ.NetMQTimer.InvokeElapsed(System.Object)
at NetMQ.NetMQPoller.Run()
at NetMQ.NetMQBeacon+Shim.Run(NetMQ.Sockets.PairSocket)
at NetMQ.NetMQActor.RunShim()
at System.Threading.ThreadHelper.ThreadStart_Context(System.Object)
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
at System.Threading.ThreadHelper.ThreadStart()
The process was terminated due to an unhandled exception. Exception Info: System.ArgumentOutOfRangeException
at System.ThrowHelper.ThrowArgumentOutOfRangeException(System.ExceptionArgument, System.ExceptionResource)
at NetMQ.Core.Patterns.Utils.ArrayExtensions.Swap[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.Collections.Generic.List`1<System.__Canon>, Int32, Int32)
at NetMQ.Core.Patterns.Utils.Distribution.Activated(NetMQ.Core.Pipe)
at NetMQ.Core.Patterns.XSub.XWriteActivated(NetMQ.Core.Pipe)
at NetMQ.Core.SocketBase.WriteActivated(NetMQ.Core.Pipe)
at NetMQ.Core.Pipe.ProcessActivateWrite(Int64)
at NetMQ.Core.ZObject.ProcessCommand(NetMQ.Core.Command)
at NetMQ.Core.SocketBase.ProcessCommands(Int32, Boolean)
at NetMQ.Core.SocketBase.GetSocketOption(NetMQ.Core.ZmqSocketOption)
at NetMQ.NetMQSelector.Select(Item[], Int32, Int64) at NetMQ.NetMQPoller.Run()
at System.Threading.ThreadHelper.ThreadStart_Context(System.Object) at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
at System.Threading.ThreadHelper.ThreadStart()
BR,
Ali