BrandonPotter / SimpleTCP

Straightforward .NET library to handle the repetitive tasks of spinning up and working with TCP sockets (client and server).
Apache License 2.0
368 stars 108 forks source link

memory leak if dont use Delimiter #62

Open VShawn opened 4 years ago

VShawn commented 4 years ago

in SimpleTcpClient

_queuedMsg would not get Clear() if none of the msg go with a delimiter

here in this while loop:

https://github.com/BrandonPotter/SimpleTCP/blob/61f1932201a7c5633ad2f003c97c83c31541fc85/SimpleTCP/SimpleTcpClient.cs#L103-L119

if i dont offer a delimiter in my reply, then _queuedMsg will always run AddRange and never get a Clear().