We have a socket server developed in C#.Net 3.5. I see server memory usage increasing whenever a client disconnectes and connects. The server disconnects the client if valid credentials were not provided.
When the client attempts to connect with invalid credentials more memory is reserved and seemingly never relinquished. The Client is trying to reconnect once every second. Below is the code handling the disconnect. This code is being called whenever a client disconnects and on encountering an error on read and write operations.
Could somebody guide me on how to debug / fix this issue?