[ https://issues.apache.org/jira/browse/THRIFT-4307?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16152054#comment-16152054 ]
ASF GitHub Bot commented on THRIFT-4307: ---------------------------------------- GitHub user tudyzhb opened a pull request: https://github.com/apache/thrift/pull/1341 THRIFT-4307: Make ssl-open timeout effective in golang client Using **tls.DialWithDialer** just like **net.DialTimeout** which in _socket.go_ to make ssl-open timeout effective. You can merge this pull request into a Git repository by running: $ git pull https://github.com/tudyzhb/thrift THRIFT-4307 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/thrift/pull/1341.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 #1341 ---- commit e79221bb1d72f634b3bfdb04f09688d2187b898d Author: tudyzhb <tudy...@gmail.com> Date: 2017-09-04T02:37:10Z THRIFT-4307: Make ssl-open timeout effective in golang client ---- > Make ssl-open timeout effective in golang client > ------------------------------------------------ > > Key: THRIFT-4307 > URL: https://issues.apache.org/jira/browse/THRIFT-4307 > Project: Thrift > Issue Type: Bug > Components: Go - Library > Affects Versions: 0.10.0, 0.11.0 > Reporter: tudyzhb > Fix For: 0.10.0, 0.11.0 > > > {code:go} > package rpc > import ( > "git.apache.org/thrift.git/lib/go/thrift" > "crypto/tls" > "time" > ) > func open() { > var ( > addr = "192.168.1.100:4000" > timeout = time.Second * 10 > transportFactory = thrift.NewTTransportFactory() > transport thrift.TTransport > err error > ) > // timeout work in normal socket > if transport, err = thrift.NewTSocketTimeout(addr, timeout); err != nil > { > return > } > // timeout not work in SSL Socket > if transport, err = thrift.NewTSSLSocketTimeout(addr, &tls.Config{ > InsecureSkipVerify: true, > }, timeout); err != nil { > return > } > transport = transportFactory.GetTransport(transport) > } > {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029)