EEIP.NET icon indicating copy to clipboard operation
EEIP.NET copied to clipboard

Disconnection causes SocketException that you cannot catch.

Open RicardoRix opened this issue 1 year ago • 0 comments

After establishing a connection and everything works. great!

But then pulling out the cable (while running) causes a severe crash with a socket exception that cannot be caught (for some reason). My program crashes and just disappears without a trace. There is however an event in windows event log.

I'm guessing it can't be caught because it's on a separate thread.

It occurs almost immediately. in EIPClient, sendUDP(). Line 871: udpClientsend.Send(o_t_IOData, O_T_Length+20+headerOffset, endPointsend);

I am using the nuget package. If I instead download and use the code then I can catch the SocketException at this line. But it's difficult to know what action (in the code) to take at this point.

RicardoRix avatar Sep 19 '25 19:09 RicardoRix