[
https://issues.apache.org/jira/browse/TS-3885?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14976545#comment-14976545
]
ASF GitHub Bot commented on TS-3885:
------------------------------------
Github user SolidWallOfCode commented on a diff in the pull request:
https://github.com/apache/trafficserver/pull/313#discussion_r43135478
--- Diff: proxy/InkAPITest.cc ---
@@ -321,12 +323,15 @@ client_handler(TSCont contp, TSEvent event, void
*data)
// Fix me: how to deal with server side cont?
TSContDestroy(contp);
return 1;
- } else {
+ } else if (TS_EVENT_NET_CONNECT == event) {
sockaddr const *addr =
TSNetVConnRemoteAddrGet(static_cast<TSVConn>(data));
uint16_t input_server_port = ats_ip_port_host_order(addr);
sleep(1); // XXX this sleep ensures the server end gets the accept
event.
--- End diff --
I think the sleep should be after the `write` because the point is to give
the kernel time to trigger the `accept`. I'll make that change as I merge this.
> Regression tests SDK_API_TSNetVConn and SDK_API_TSPortDescriptor run forever
> ----------------------------------------------------------------------------
>
> Key: TS-3885
> URL: https://issues.apache.org/jira/browse/TS-3885
> Project: Traffic Server
> Issue Type: Bug
> Components: TS API
> Reporter: Pushkar Pradhan
> Assignee: Pushkar Pradhan
> Fix For: 6.1.0
>
>
> The regression tests SDK_API_TSNetVConn and SDK_API_TSPortDescriptor run
> forever. This happens because on a vanilla build
> proxy.config.net.defer_accept is non-zero.
> If this value is non-zero it tells the kernel on the server to notify the
> listening process only when the client sends any data on the socket.
> Since the client_handler code in these tests never sends any data, the
> server_handler is never invoked.
> Since the server_handler code is the one that sets the regression test as
> passed, it just runs forever.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)