Ended connection for each query