Please consider this simple scenario. I have two .NET 4.0 / C # console applications. Let's call their name "Launcher" and "Socket App".
The launcher uses nothing more than the socket app that launches under any specific circumstances. The start () method SocketApp runs for a while and after some time its main () loop is released and the process dies. And this process remains until the launcher starts it again. (Many examples under unconditional SocketApp will be launched) and hence the cycle goes on well it is running well for days at a time.
But sometimes SocketApp will not start. This throws an exception when the remote tries to listen on the channel socket. The exception is given below in depth in the internal remote code, due to the precision of the band () call The reason for the failure of the bind call is that the socket on the first successful portion of the socket app was never released. I know that this is the case because if I want to make sure that the socket app is off and I have a netstate-N, then I can see that the port which I want to bind is to be bound. This is a permanent CLOSE_WAIT situation. And it only remains in that CLOSE_WAIT state.
The only way Windows to release that socket (and this is where it has become weird) Close the Launcher app Why would it be so in the world? Launcher runs in its own process and does not use sockets at all. Its only purpose is to launch SocketApp, so why does the socket app use the Socket app to close the launcher? Could this be because I am not calling the dispute () on the process object from the launcher? This disturbance rarely appears that it takes days to decide whether any special improvement is effective or not.
It is in fact the hands of the operating system will hang around in use for the harbor to issue the port at that point . There is a reference for here.
Comments
Post a Comment