Skip to content

Disconnection causes SocketException that you cannot catch. #43

@RicardoRix

Description

@RicardoRix

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions