Skip to content
This repository has been archived by the owner on Mar 22, 2019. It is now read-only.

handle closed listeners #14

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

absolute8511
Copy link

Add the close interface for listener and check the closed while restart.

@facebook-github-bot
Copy link

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at [email protected]. Thanks!

@facebook-github-bot
Copy link

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

gracenet/net.go Outdated
files[i], err = l.(filer).File()
files := make([]*os.File, 0, len(listeners)-len(closedList))
for _, l := range listeners {
is_closed := false
Copy link
Contributor

Choose a reason for hiding this comment

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

Use go like naming, ie isClosed.

@daaku
Copy link
Contributor

daaku commented Aug 7, 2015

I think this looks good but would like to see tests (as hard as they are to write due to the nature of this package).

@absolute8511
Copy link
Author

I think the test is hard in the package, however it could be done with an external test tool.

@daaku
Copy link
Contributor

daaku commented Aug 11, 2015

Look at the existing tests - I think it should be possible to write some without having to use an external tool.

@solher
Copy link

solher commented Jul 30, 2016

Any news about this? I would definitely love to use that feature.

@Nasir13
Copy link

Nasir13 commented Aug 25, 2017

I have no idea about this tell me now solher

wangjian-pg and others added 4 commits December 12, 2017 17:08
Merge 'master' of github.com/facebookgo/grace and support  gracehttp.ServeWithNet
Merge 'master' of github.com/facebookgo/grace and support  gracehttp.ServeWithNet
@@ -9,7 +9,7 @@ import (
"os"
"time"

"github.com/facebookgo/grace/gracehttp"
"github.com/absolute8511/grace/gracehttp"

Choose a reason for hiding this comment

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

This was probably flipped for testing, but we should undo this before merging here.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants