Remove calls to deprecated close_connection function.

see #660