Skip to content

graceful shutdown err #1856

@hoslo

Description

@hoslo

What happened:

send a http request
kill program
return {"code":500,"reason":"","message":"context canceled","metadata":{}}

What you expected to happen:

return right response

How to reproduce it (as minimally and precisely as possible):

send a http request
kill program

Anything else we need to know?:

Environment:

  • Kratos version (use kratos -v): v2.1.5
  • Go version (use go version): go version go1.17.6 linux/amd64
  • OS (e.g: cat /etc/os-release): centos7
  • Others:
    this is start log

INFO msg=config loaded: CONSUL_ADDR format:
INFO msg=config loaded: CONSUL_HTTP_TOKEN format:
INFO msg=config loaded: LOG_IP format:
INFO msg=config loaded: NODE_IP format:
INFO msg=watcher's ctx cancel : context canceled
INFO msg=config loaded: homework/user.service/develop/config.yaml format: yaml
seconds:20
INFO msg=[gRPC] server listening on: [::]:9000
INFO msg=[HTTP] server listening on: [::]:8000

and i use handler ctx as redis ctx,if i use context.Background() as redis ctx, it return right response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions