STOP-AFTER .. well... doesn't ... - Forum - OpenEdge Development - Progress Community

STOP-AFTER .. well... doesn't ...

 Forum

STOP-AFTER .. well... doesn't ...

  • 10.2B SP05

    Either something is broken or I'm being stupid. Don't place any bets just yet ...

    take this snippet of code

    repeat stop-after 1 on stop undo, leave:

          SocketHandle:connect("-H SomeHost -S SomePort").

          leave.

    end.

    I *expected* that this would timeout after a second if either SomeHost or SomePort was not available.

    it doesn't.

    Discuss.

  • The documentation says:

    Other points to consider are:

    • If the expression evaluates to zero or less, then this is the equivalent of not specifying a STOP-AFTER phrase.
    • STOP-AFTER phrases are not intended to interact with user interfaces.
    • Blocking calls to third party software components, where the AVM has transferred execution control, cannot be timed out. This category includes operating system calls, MS Windows system calls, and calls to any third party DLLs and Unix shared objects.

    I would guess this falls under the third category.

    Consulting in Model-Based Development, Transformation, and Object-Oriented Best Practice  http://www.cintegrity.com

  • the socket handle is a plain old progress socket. So I guess that it

    doesn't fall under category 3

    Unless they classify a socket connection as an O/S call.

    Bugger.

    On 22 November 2011 19:16, Thomas Mercer-Hursh

  • That's my guess.  It is something that reaches outside the AVM and therefore is no longer in scope of control of the AVM.  The ABL portion is really just an interface to the OS feature.

    Consulting in Model-Based Development, Transformation, and Object-Oriented Best Practice  http://www.cintegrity.com

  • It would be interesting to test for a DB connection.  While that seems like all ABL, it actually involves connecting throught the TCP/IP layer, so I wouldn't be at all surprised if there was the same limitation.

    Consulting in Model-Based Development, Transformation, and Object-Oriented Best Practice  http://www.cintegrity.com

  • Unless they classify a socket connection as an O/S call.

    I'd do so.

  • It is a system call. Furthermore, a connect() system call does not have a timeout parameter. It does time out eventually though.

  • is there any way of specifying a timeout ? some third party tcp

    components have a timeout property.

    On 22 November 2011 20:48, Gus Bjorklund