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

Unlink the unix file before start grpc newserver #35

Merged
merged 1 commit into from
Jun 12, 2018
Merged

Conversation

sufuf3
Copy link
Contributor

@sufuf3 sufuf3 commented Jun 12, 2018

Related to: #32
Unlink before start grpc newserver, if the server is running as unix server.
I refered to https://github.com/grpc/grpc-go/blob/master/test/end2end_test.go#L577

@codecov
Copy link

codecov bot commented Jun 12, 2018

Codecov Report

Merging #35 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #35   +/-   ##
=======================================
  Coverage   86.44%   86.44%           
=======================================
  Files           7        7           
  Lines         177      177           
=======================================
  Hits          153      153           
  Misses         15       15           
  Partials        9        9

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ff044c9...fba1cc9. Read the comment docs.

server/main.go Outdated
lis, err = net.Listen("tcp", tcpAddr)
} else {
err = syscall.Unlink(unixPath)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we could ignore the error when unlink failed

syscall.Unlink(unixPath)

Unlink before start grpc newserver, if the server is running as unix
server. close #32
@John-Lin John-Lin requested review from hwchiu and chenyunchen June 12, 2018 03:17
Copy link
Contributor

@hwchiu hwchiu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hwchiu hwchiu merged commit d32f74a into master Jun 12, 2018
@hwchiu hwchiu deleted the sufuf3/issue32 branch June 12, 2018 03:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants