Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Workaround of Timeout on https

by starbolin (Hermit)
on May 14, 2008 at 16:13 UTC ( [id://686558]=note: print w/replies, xml ) Need Help??


in reply to Workaround of Timeout on https

First, why aren't you using the timeout() member of LWP::UserAgent? Second, your code does not capture the return from die(). Remember, die() exits the eval() setting $@ with the string given. You need to check the status of $@ outside your eval().

Updtate: see also LWP - timeout


s//----->\t/;$~="JAPH";s//\r<$~~/;{s|~$~-|-~$~|||s |-$~~|$~~-|||s,<$~~,<~$~,,s,~$~>,$~~>,, $|=1,select$,,$,,$,,1e-1;print;redo}

Replies are listed 'Best First'.
Re^2: Workaround of Timeout on https
by perlmonkdr (Beadle) on May 15, 2008 at 13:54 UTC

    Hi, thk, in fact i checking the status of $@ but not works too, i'm not use timeout here becouse doesn't work see the report http://rt.cpan.org/Public/Bug/Display.html?id=22839, i see your post but it's from 2001 actually win32 support signal.. i guess... becouse I was used alarm from 5 year with problem....

    Thk U very much really

      Not all processes in the network stack are interruptible. Perl can't process an ALRM signal until control is returned to the perl interpreter. One partial remediation is to break up the task into small chunks. ie. Perform DNS queries first and pinging the server before issuing GETs.

      The only sure 'workaround' is to fork a child to handle the network communication. This allows the parent to time-out and leave the children to the reaper.


      s//----->\t/;$~="JAPH";s//\r<$~~/;{s|~$~-|-~$~|||s |-$~~|$~~-|||s,<$~~,<~$~,,s,~$~>,$~~>,, $|=1,select$,,$,,$,,1e-1;print;redo}

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://686558]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (2)
As of 2024-04-25 20:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found