Call flush after writing the identity message
Merge pull request #684 from hurtonm/master

Call flush after writing the identity message