closing rest clients