You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "Bryan Call (JIRA)" <ji...@apache.org> on 2015/07/08 20:13:04 UTC

[jira] [Commented] (TS-3728) Socket option are not being set on new incoming socket connections

    [ https://issues.apache.org/jira/browse/TS-3728?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14619083#comment-14619083 ] 

Bryan Call commented on TS-3728:
--------------------------------

Looking at both the incoming and outgoing connections they are handled differently.  It is understandable that there is confusion around this.

Having SO_LINGER on for the listening socket does:
{code}
    l.l_onoff = 0;
    l.l_linger = 0;
    if ((sockopt_flag_in & NetVCOptions::SOCK_OPT_LINGER_ON) &&
        (res = safe_setsockopt(fd, SOL_SOCKET, SO_LINGER, (char *)&l, sizeof(l))) < 0) {
{code}

And for the outgoing connections it does:
{code}
    if (opt.sockopt_flags & NetVCOptions::SOCK_OPT_LINGER_ON) {
      struct linger l;
      l.l_onoff = 1;
      l.l_linger = 0;
      safe_setsockopt(fd, SOL_SOCKET, SO_LINGER, (char *)&l, sizeof(l));
{code}

Right now after a new socket is accepted it is not applying the SO_LINGER options because of a bug.  It would apply the same options as the outgoing if it was working.

> Socket option are not being set on new incoming socket connections
> ------------------------------------------------------------------
>
>                 Key: TS-3728
>                 URL: https://issues.apache.org/jira/browse/TS-3728
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Network
>            Reporter: Bryan Call
>            Assignee: Bryan Call
>              Labels: yahoo
>             Fix For: 6.0.0
>
>
> Socket option configuration value is not set in the code and the Connection is not being set to SOCK_STREAM.  Both of these need to be done for new incoming socket connection to have their options set.



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