[fix] Automatically close the connection when done.