TCP DialTimeout Not Working Stuck for Hours.

258 views
Skip to first unread message

kumargv

unread,
Dec 22, 2016, 1:42:52 AM12/22/16
to golang-nuts
Hi,

I was trying to connect with DialTimeout as:

address:= "127.0.0.1:58888"
address:= "127.0.0.1:7432"

conn, err := net.DialTimeout("tcp", address, time.Duration(30)*time.Second)

if err != nil {
fmt.Println("error in conn : ",err)
return nil, err
}


My program Stuck in Net.DialTimeout

I am not getting what could be the problem?

Am I missing out on something?

Please guide.

Thanks & Regards

Dave Cheney

unread,
Dec 22, 2016, 2:05:44 AM12/22/16
to golang-nuts
Can you please give a few more details. Which version of Go, which operating system, that kind of thing.

kumargv

unread,
Dec 22, 2016, 2:13:14 AM12/22/16
to golang-nuts
GO 1.7 
centos 7.2.1511

Dave Cheney

unread,
Dec 22, 2016, 2:27:45 AM12/22/16
to golang-nuts
Thanks for confirming, I had thought it was the usual windows anti virus issues, but that is not applicable if you are running linux.

Can you please provide a small runnable code sample that demonstrates the problem.
Message has been deleted

Dave Cheney

unread,
Dec 22, 2016, 5:00:59 AM12/22/16
to golang-nuts
Please try to produce a runnable piece of code that demonstrates the problem. My suspicion is this is not related to net.DialTimeout but the only way to prove or disprove this is for you to build a simple example program which I and others can run to confirm the issue.

Thanks

Dave

Reply all
Reply to author
Forward
0 new messages