Cleanup connection on close.