Commit 5b65a58d authored by coredns[bot]'s avatar coredns[bot]

auto go fmt

Signed-off-by: default avatarcoredns[bot] <bot@bot.coredns.io>
parent 0f5e7bdf
...@@ -100,7 +100,7 @@ func (p *Proxy) Connect(ctx context.Context, state request.Request, opts options ...@@ -100,7 +100,7 @@ func (p *Proxy) Connect(ctx context.Context, state request.Request, opts options
// records the origin Id before upstream. // records the origin Id before upstream.
originId := state.Req.Id originId := state.Req.Id
state.Req.Id = dns.Id() state.Req.Id = dns.Id()
defer func(){ defer func() {
state.Req.Id = originId state.Req.Id = originId
}() }()
...@@ -122,7 +122,7 @@ func (p *Proxy) Connect(ctx context.Context, state request.Request, opts options ...@@ -122,7 +122,7 @@ func (p *Proxy) Connect(ctx context.Context, state request.Request, opts options
return nil, ErrCachedClosed return nil, ErrCachedClosed
} }
// recovery the origin Id after upstream. // recovery the origin Id after upstream.
if ret != nil{ if ret != nil {
ret.Id = originId ret.Id = originId
} }
return ret, err return ret, err
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment