GitHub user fumin opened a pull request:

    https://github.com/apache/thrift/pull/309

    Handle errors from Accept() correctly

    Often in tests, servers are started and closed when a test case is
    finished, as in the standard library's "httptest" package.
    
    http://golang.org/pkg/net/http/httptest/#example_Server
    
    However, currently the "p.quit" channel of TSimpleServer does not
    correctly handle the case when the listener socket is Closed, resulting
    in spurious logs with the text "Accept err: ...".
    For details of handling closed listener sockets, see
    
    https://code.google.com/p/go/issues/detail?id=4373
    http://zhen.org/blog/graceful-shutdown-of-go-net-dot-listeners/
    http://stackoverflow.com/a/13419724/2182406

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/fumin/thrift thrift-2881

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/thrift/pull/309.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #309
    
----
commit fcd3f8b888a4f23b33227843a26b17eb27a69ce4
Author: awaw fumin <[email protected]>
Date:   2014-12-08T13:04:55Z

    Handle errors from Accept() correctly
    
    Often in tests, servers are started and closed when a test case is
    finished, as in the standard library's "httptest" package.
    
    http://golang.org/pkg/net/http/httptest/#example_Server
    
    However, currently the "p.quit" channel of TSimpleServer does not
    correctly handle the case when the listener socket is Closed, resulting
    in spurious logs with the text "Accept err: ...".
    For details of handling closed listener sockets, see
    
    https://code.google.com/p/go/issues/detail?id=4373
    http://zhen.org/blog/graceful-shutdown-of-go-net-dot-listeners/
    http://stackoverflow.com/a/13419724/2182406

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to