Skip to content

Commit

Permalink
Update captureExit
Browse files Browse the repository at this point in the history
  • Loading branch information
levichevdmitry committed Apr 10, 2021
1 parent b191d7f commit 08f96f0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# <img src="https://uploads-ssl.webflow.com/5ea5d3315186cf5ec60c3ee4/5edf1c94ce4c859f2b188094_logo.svg" alt="Pip.Services Logo" width="200"> <br/> IoC container for Golang Changelog

## <a name="1.1.2"></a> 1.1.2 (2021-04-10)

### Bug Fixes
- Add system signals (SIGTERM, SIGINT) notification in ProcessContainer

## <a name="1.1.1"></a> 1.1.1 (2021-04-09)

### Bug Fixes
Expand Down
2 changes: 1 addition & 1 deletion component.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pip-services3-container-go",
"registry": "github.com/pip-services3-go",
"version": "1.1.1",
"version": "1.1.2",
"build": 0
}
3 changes: 2 additions & 1 deletion container/ProcessContainer.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"os"
"os/signal"
"strings"
"syscall"

cconfig "github.com/pip-services3-go/pip-services3-commons-go/config"
cconv "github.com/pip-services3-go/pip-services3-commons-go/convert"
Expand Down Expand Up @@ -167,7 +168,7 @@ func (c *ProcessContainer) captureExit(correlationId string) {
c.Logger().Info(correlationId, "Press Control-C to stop the microservice...")

ch := make(chan os.Signal)
signal.Notify(ch, os.Interrupt)
signal.Notify(ch, os.Interrupt, syscall.SIGINT, syscall.SIGTERM)

go func() {
select {
Expand Down

0 comments on commit 08f96f0

Please sign in to comment.