Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix: use buffered channel for signal notifications #471

Merged
merged 1 commit into from
Sep 14, 2021

Conversation

SataQiu
Copy link
Member

@SataQiu SataQiu commented Sep 14, 2021

What type of PR is this?

/kind bug

What this PR does / why we need it:

bugfix: use buffered channel for signal notifications

When I upgrade to go 1.17, executing make will cause an error:

# go version
go version go1.17.1 darwin/amd64
# make
go fmt ./pkg/... ./cmd/...
pkg/yurthub/network/dummyif_test.go
pkg/yurthub/network/dummyif_unsupported.go
go vet ./pkg/... ./cmd/...
# github.com/openyurtio/openyurt/cmd/yurt-tunnel-server
cmd/yurt-tunnel-server/server.go:39:2: misuse of unbuffered os.Signal channel as argument to signal.Notify
make: *** [vet] Error 2

FYI: https://github.com/golang/go/blob/ee91bb83198f61aa8f26c3100ca7558d302c0a98/src/os/signal/example_test.go#L14-L17

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?

NONE

other Note

@openyurt-bot openyurt-bot added the kind/bug kind/bug label Sep 14, 2021
@openyurt-bot openyurt-bot added the size/XS size/XS: 0-9 label Sep 14, 2021
@rambohe-ch
Copy link
Member

/lgtm
/approve

@openyurt-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rambohe-ch, SataQiu

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openyurt-bot openyurt-bot added the approved approved label Sep 14, 2021
@openyurt-bot openyurt-bot merged commit 9a14e44 into openyurtio:master Sep 14, 2021
YRXING pushed a commit to YRXING/openyurt that referenced this pull request Sep 15, 2021
MrGirl pushed a commit to MrGirl/openyurt that referenced this pull request Mar 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved approved kind/bug kind/bug lgtm lgtm size/XS size/XS: 0-9
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants