Fix valid close connection