proc/worker/agent.go
func (w *Worker) AgentAfterUncooperativeCloseRequest(job *data.Job) error {
	logger := w.logger.Add("method", "AgentAfterUncooperativeCloseRequest",
		"job", job)
	channel, err := w.relatedChannel(logger, job,
		data.JobAgentAfterUncooperativeCloseRequest)
	if err != nil {
		return err
	}

	logger = logger.Add("channel", channel)

	if channel.ServiceStatus != data.ServiceTerminated {
		_, err = w.processor.TerminateChannel(
			channel.ID, data.JobTask, true)
		if err != nil {
			logger.Error(err.Error())
			return ErrTerminateChannel
		}
	}

	channel.ChannelStatus = data.ChannelInChallenge
	if err = w.db.Update(channel); err != nil {
		logger.Error(err.Error())
		return ErrInternal
	}

	return nil
}
func (w *Worker) AgentAfterUncooperativeCloseRequest(job *data.Job) error {
	logger := w.logger.Add("method", "AgentAfterUncooperativeCloseRequest",
		"job", job)
	channel, err := w.relatedChannel(logger, job,
		data.JobAgentAfterUncooperativeCloseRequest)
	if err != nil {
		return err
	}

	logger = logger.Add("channel", channel)

	if channel.ServiceStatus != data.ServiceTerminated {
		_, err = w.processor.TerminateChannel(
			channel.ID, data.JobTask, true)
		if err != nil {
			logger.Error(err.Error())
			return ErrTerminateChannel
		}
	}

	channel.ChannelStatus = data.ChannelInChallenge
	if err = w.db.Update(channel); err != nil {
		logger.Error(err.Error())
		return ErrInternal
	}

	return nil
}
// AgentAfterUncooperativeCloseRequest sets channel's status to challenge period.