Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception when call Server.Stop() #26

Open
Tivaty opened this issue Jun 26, 2023 · 1 comment
Open

Exception when call Server.Stop() #26

Tivaty opened this issue Jun 26, 2023 · 1 comment

Comments

@Tivaty
Copy link

Tivaty commented Jun 26, 2023

Hello,
I catch this exception all the time, when server has connection or no connection to client.
it is from the line of listeningSocket.Shutdown(SocketShutdown.Both);

the server is turned off but exception is still happen at this line.
Please support to check and update.
Thank you.

`System.Net.Sockets.SocketException
HResult=0x80004005
Message=A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied.
Source=System.Net.Sockets
StackTrace:
at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, String callerName)
at System.Net.Sockets.Socket.Shutdown(SocketShutdown how)
at lib60870.CS104.Server.Stop() in D:\work\C#\iec104\lib60870.NET\lib60870\CS104\Server.cs:line 943

This exception was originally thrown at this call stack:
[External Code]
lib60870.CS104.Server.Stop() in Server.cs`

@juwiefer-btc
Copy link

This is another issue addressed in https://github.com/juwiefer-btc/lib60870.NET.

@mzillgith: You might want to skim through the diff to see the issues I have addressed. I could even create a pull request, but I guess my coding style might not fit in very well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants