handle disconnect
follow rfc and restrict to 512 bytes