update close connection handling