Move closing a connection to new method
Rename flag to reflect change in semantics