Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
How to let net.LookupMX timeout?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Googol Lee  
View profile  
 More options Nov 15 2012, 1:12 am
From: Googol Lee <googol...@gmail.com>
Date: Wed, 14 Nov 2012 22:12:07 -0800 (PST)
Local: Thurs, Nov 15 2012 1:12 am
Subject: How to let net.LookupMX timeout?

Recently Great Firewall in China is more powerful and pollute Google
Domain. When try to net.LookupMX("gmail.com"), it may halt a long time and
no return.

Is there a way to let net.LookupMX timeout? Although it won't block the
other request, I hope it can release after a while and receive a timeout
error.

And, net.smtp doesn't have timeout.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kamil Kisiel  
View profile  
 More options Nov 15 2012, 2:04 am
From: Kamil Kisiel <kamil.kis...@gmail.com>
Date: Wed, 14 Nov 2012 23:04:44 -0800 (PST)
Local: Thurs, Nov 15 2012 2:04 am
Subject: Re: How to let net.LookupMX timeout?

It seems the Lookup functions all get their options from /etc/resolv.conf
(at least on unix, I'm not familiar with how this stuff works on Windows).

You should be able to add a line that says

options timeout:n

to /etc/resolv.conf to change the timeout. There's also numerous other
options which may be useful in speeding up your DNS resolution, check man 5
resolver or man 5 resolv.conf.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Googol Lee  
View profile  
 More options Nov 15 2012, 2:19 am
From: Googol Lee <googol...@gmail.com>
Date: Wed, 14 Nov 2012 23:19:12 -0800 (PST)
Local: Thurs, Nov 15 2012 2:19 am
Subject: Re: How to let net.LookupMX timeout?

Thanks for rapid reply. It's helpful.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Martin Kühl  
View profile  
 More options Nov 15 2012, 2:09 am
From: Martin Kühl <martin.ku...@gmail.com>
Date: Thu, 15 Nov 2012 08:09:28 +0100
Local: Thurs, Nov 15 2012 2:09 am
Subject: Re: [go-nuts] How to let net.LookupMX timeout?
There is a very nice example and description of adding timeouts here:
https://gobyexample.com/timeouts


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »