Hi,
We have socket server which is developed in c# .net 3.5.
I see server memory keep on increasing whenver client disconnectes and connects.The server disconnects client if client didn;t send valid credentials.
When client is trying to connect with invalid credentials the memory is keep on increasing.
Here is the code that handles disconnection.
Any ideas?
We have socket server which is developed in c# .net 3.5.
I see server memory keep on increasing whenver client disconnectes and connects.The server disconnects client if client didn;t send valid credentials.
When client is trying to connect with invalid credentials the memory is keep on increasing.
Here is the code that handles disconnection.
Code:
try { if (state.workSocket != null) { log.DebugFormat("ssl socket displose,{0},{1}", Doomed, IP); state.workSocket.Shutdown(SocketShutdown.Both); state.workSocket.Close(1); state.workSocket = null; log.DebugFormat("ssl socket displose complete,{0},{1}", Doomed, IP); } } catch(Exception e1) { log.DebugFormat("error in ssl socket displose,{0},{1},{2}", Doomed, IP,e1); } try{ if (state.workSslStream != null) { log.DebugFormat("ssl stream displose,{0},{1}", Doomed, IP); state.workSslStream.Dispose(); state.workSslStream = null; } } catch (Exception e1) { log.DebugFormat("error in ssl stream displose,{0},{1},{2}", Doomed, IP,e1); } state = null; }
Comment