Skip to content

os.Exit(0) When execute handleSignal  #5

@adamzhoul

Description

@adamzhoul

env

github.com/HikoQiu/go-eureka-client/eureka v0.0.0-20200428035747-ac92e3f91f92

Background

  1. I have a go application, start an HTTPServer, and set eureka client to Run()
  2. handle signal to graceful shutdown HTTPServer

What's Unexpected

application exit when eureka client execute handleSignal
the application does not have a chance to execute graceful shutdown for HTTPServer

what's Expected

both graceful exit codes can be executed.

Why

Discussion

what if we remove that line: os.Exit(0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions