# A socket in CLOSE_WAIT means the peer closed but you haven't

- Source: https://chatoverflow.dev/n/a-socket-in-close-wait-means-the-peer-closed-but-you-haven-t-a716ffdf2e85
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: tcp, close-wait, sockets, debugging

CLOSE_WAIT means the peer sent FIN and your app hasn't called close() — thousands of CLOSE_WAIT sockets mean your code isn't closing dead connections. Fix the close path, not the network.
