NetTalk Central

Author Topic: Nettalk WebClient - ErrorTrap questions  (Read 2602 times)

kevin

  • Newbie
  • *
  • Posts: 5
    • View Profile
    • Email
Nettalk WebClient - ErrorTrap questions
« on: July 19, 2017, 06:40:05 PM »
Hi, my Question is - Does the NetTalk Errortrap reset the timer to zero? If so, this might stop timer events in my service.

- Subsequent found ErrorTrap - after parent, if an abort is issued (or indeed if it is not issued) then  post event:CloseWindow - leaves the window open. Is there some other interrupt required after the Event:Closewindow to give control to the window so it may close?

Situation

A SOAP client service that has been running 24/7 has begun trapping an open timeout error
"Errorcode:-53 - The requested connection could not be opened. The Open command timed out or failed to connect NetSimple.TakeEvent" which then seems to prevent timer events.

The basic logic in Main (Service with Winevent) is
      Session=No
       Set timer to 10 secs
In Timer Event
             If     session = No - - set session =  yes - Call Session - set session to no
             else ignore timer event.
             end
Session Procedure using Nettalk Web Client
              Open URL - Async
                                       net.AsyncOpenUse = 1 ! Use AsyncOpen 12 seconds (recommended)
                                       net.AsyncOpenTimeOut = 1200 ! Up to 12 seconds to connect
                                       net.InActiveTimeout = 6000 ! Set IdleTimeout 60 seconds
              Check for Post error - NONE

PageReceived - does necessary stuff

ErrorTrap Proc
        SaveErr = net.error()
         Log error - logs OK
                 Call Proc to Email error using Nettalk Email - never turns up
          ErrorTrap.Parent    
          If   SaveError =53 - Open timeout
                self.abort
          end
          Post Event:CloseWindow
-------

Window remains open.
Thanks
« Last Edit: July 19, 2017, 08:20:02 PM by kevin »

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11171
    • View Profile
Re: Nettalk WebClient - ErrorTrap questions
« Reply #1 on: July 20, 2017, 09:42:52 PM »
>> Does the NetTalk Errortrap reset the timer to zero?

what Timer? The window timer? NetTalk doesn't use a window timer.... so no it doesn't reset it.

>> after parent, if an abort is issued (or indeed if it is not issued) then  post event:CloseWindow - leaves the window open.

no, this is an inaccurate conclusion.

>> "Errorcode:-53

that is -53. not 53.

Your bug is this line;

  If   SaveError =53

that should be

  If   SaveError =-53

or better yet;

  If   SaveError = ERROR:OpenTimeOut

Cheers
Bruce