Hey.

I'm experiencing some trouble with closing a connection to a server, I have a user that connects Authenicates them Etc and logs everything to a listbox when a password is accepted it will add an item "password accepted"

but for some reason on the Client when i try

client.Client.Shutdown(SocketShutdown.Both)
client.Client.Close()

another "Password Accepted" will appear

I believe its because the streamwriter is not cleared when I try disconnect and sends it but it should be empty

Code:
            sw = New IO.StreamWriter(client.GetStream)
            sw.Write(Msg)
            sw.Flush()
Any ideas? I'm really confused

thankyou

Sumn3rd