Investigate connections closing if large messages are sent
Easy to reproduce by uploading a large (100s of kB) avatar.
Seems to end up in a strange state where the connection is considered open by the server but closed by the client (?). Could be a server issue.