Socket close Issue
Hi All,
I am executing my application in two instances (S0 and S1) in FC8. Both will use different IP Address. Each instance will create 2TCP and 1UDP sockets. My application is written like, when one instance gets killed or crashes, the other instance will bring it up. So, when I killed S0, S1 has bought it(S0) up successfully. Now S0 will be running in background process.Then I killed S1, S0 has bought it(S1) up ,but with the TCP Sockets binding failed.Now, S1 will be running in background process. I want to solve this issue.Please help me.
I am using Socket Reuse options in all the Sockets.But still I get the above mentioned issue.
When I did netstat -na and checked I could able to see the TCP socket is still listening but not closed. I think because of this binding fails.
So, how to close the sockets when I kill my program?
|