LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

"URL get HTTP document.vi" does not time-out

I have a program that repeatedly gets data from the Internet using "URL
get HTTP document.vi". After running for a while it gets stuck in the
get HTTP VI, and the VI never times out. I tried to write my own time-
out by closing the VI if it times out, but it will not close while it
is stuck in the get HTTP VI. Any ideas on how to force a time-out?

--
Toby Stensland
toby@stensland.com


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
0 Kudos
Message 1 of 3
(4,550 Views)
Well, I see you posted this in 1999 so I don't really expect anyone to see my response, but I just encountered this problem myself.

The reason URL Get HTTP Document sometimes doesn't time out is that is it very poorly written. Several of the subVIs strip out the timeout error using VI "No Time Out Error". This can cause the VI to be stuck in an infinite loop in several different locations. For example, TCP Write Entire Buffer has a tight while loop that runs until the entire buffer is sent or an error other than a timeout error is encountered. If a timeout error is generated (for example, the by remote http server dying in the middle of the transfer), this routine ignores it and just keeps trying to send data forever. It's really dumb. Right now I'm trying
to decide if I should modify NI's existing routine, junk it and start from scratch, or go outside of Labview entirely and call some Microsoft API function.

I'm using Labview 6.1.

-Rob
0 Kudos
Message 2 of 3
(4,550 Views)
Hi,

Your response is still read.

Using MS API will make it platform dependant, which, if possible, should be
avoided...

Regards,

Wiebe.


"Rob Calhoun" wrote in message
news:50650000000500000065650100-1078497998000@exchange.ni.com...
> Well, I see you posted this in 1999 so I don't really expect anyone to
> see my response, but I just encountered this problem myself.
>
> The reason URL Get HTTP Document sometimes doesn't time out is that is
> it very poorly written. Several of the subVIs strip out the timeout
> error using VI "No Time Out Error". This can cause the VI to be stuck
> in an infinite loop in several different locations. For example, TCP
> Write Entire Buffer has a tight while loop that runs until the entire
> buffer is sent or
an error other than a timeout error is
> encountered. If a timeout error is generated (for example, the by
> remote http server dying in the middle of the transfer), this routine
> ignores it and just keeps trying to send data forever. It's really
> dumb. Right now I'm trying to decide if I should modify NI's existing
> routine, junk it and start from scratch, or go outside of Labview
> entirely and call some Microsoft API function.
>
> I'm using Labview 6.1.
>
> -Rob
0 Kudos
Message 3 of 3
(4,550 Views)