terminate rpc server