using close instead of resetConnection