Closing connection in destructor.