You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "awaw fumin (JIRA)" <ji...@apache.org> on 2014/12/08 14:01:12 UTC

[jira] [Updated] (THRIFT-2881) Handle errors from Accept() correctly

     [ https://issues.apache.org/jira/browse/THRIFT-2881?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

awaw fumin updated THRIFT-2881:
-------------------------------
    Description: 
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

  was:
Often in tests, servers are started and closed when a test case is finished, as in the standard library's "httptest" package.
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


> Handle errors from Accept() correctly
> -------------------------------------
>
>                 Key: THRIFT-2881
>                 URL: https://issues.apache.org/jira/browse/THRIFT-2881
>             Project: Thrift
>          Issue Type: Bug
>          Components: Go - Library
>    Affects Versions: 0.9.2
>         Environment: Linux Amazon AMI
>            Reporter: awaw fumin
>              Labels: patch
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> 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



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)