Linux: Close 49200 socket out of TIME_WAIT state

1152135 pts.
Tags:
Linux
Networking
Socket
One of my programs on Linux keeps crashing on me. When I try to open it quick after it closes, I see it is listening on socket 49201 instead of 49200 (that's what it was in the first time). When I looked at Netstat, it shows that 49200 is a TIME_WAIT state. Can I force the socket out of this state? Thanks!
0

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • TheRealRaven
    This looks like the same question on ServerFault from seven years ago, including the same port numbers. Since it's so old, it's unlikely the problem still exists if it was a problem at all.

    In general, TIME_WAIT sockets shouldn't be a problem in themselves; the state is normal and expected and will take care of itself when the timer expires (or the close completes).

    The part of the question referencing the port numbers can only be answered by looking at the source code to see what it does when it finds that the socket is in use.

    Also, RFC-1323, proposed May 1992 and even superseded since then, should be implemented in many stacks. It's hard to tell if the question is particularly relevant.
    36,320 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: