Don't emit close on error.

Often close and error are called for the same connection.