Jump to content

Ping() cached?


Recommended Posts

  • Developers

How are you going "Offline"? disconnect your computer or a working LAN and disconnect the router?

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Replies 41
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • Developers

What happens when you disconnect your computer from LAN and/or WiFI?
For me that works instantaneously.

Jos

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

When i disconnect ping continue with error:

@@ Debug : $rc = 0 Error code: 4 time:13047.4083335125
@@ Debug : $rc = 0 Error code: 4 time:14044.8842988662
@@ Debug : $rc = 0 Error code: 4 time:15055.2400085602
@@ Debug : $rc = 0 Error code: 4 time:16152.1209570648

....

see previous

Link to comment
Share on other sites

  • Developers

duh ...  of course I wanted to know what happens when you then connect again. does it give the same issue?

Jos 

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

When i reconnect it ping 14 times, every second, with error and finally goes.

But if i stop script and restart it ping immediately without error.

it is as if for 14 seconds, it uses the cache instead of checking again.

You have to leave the script running when go offline-online to reproduce.

Edited by Ontosy
Link to comment
Share on other sites

  • Developers

As I said, for me the returned RC&@error change instantaneously when I disconnect/connect.

Jos

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

this after unplug and plug without disconnect internet in router:

Process started >>>
@@ Debug : $rc = 61   Error code: 0 time:168.804160510172
@@ Debug : $rc = 61   Error code: 0 time:1311.96146674572
@@ Debug : $rc = 61   Error code: 0 time:2451.54723835795
[UNPLUG]
@@ Debug : $rc = 0   Error code: 4 time:15437.7397960908
@@ Debug : $rc = 0   Error code: 4 time:16435.2357284528
@@ Debug : $rc = 0   Error code: 4 time:17432.6569125271

[PLUG]
@@ Debug : $rc = 0   Error code: 4 time:18437.305129678
@@ Debug : $rc = 0   Error code: 4 time:19429.5476909435
@@ Debug : $rc = 0   Error code: 4 time:20427.8679023685
@@ Debug : $rc = 0   Error code: 4 time:21425.2691194345
@@ Debug : $rc = 0   Error code: 4 time:22424.6660133871
@@ Debug : $rc = 0   Error code: 4 time:23422.0303682838
@@ Debug : $rc = 0   Error code: 4 time:24419.4710073919
@@ Debug : $rc = 0   Error code: 4 time:25419.1064814957
@@ Debug : $rc = 0   Error code: 4 time:26416.5051386888
@@ Debug : $rc = 0   Error code: 4 time:27413.8111284841
@@ Debug : $rc = 0   Error code: 4 time:28411.6081018952
@@ Debug : $rc = 0   Error code: 4 time:29409.0538607491
@@ Debug : $rc = 0   Error code: 4 time:30406.8487862619
@@ Debug : $rc = 0   Error code: 4 time:31403.9801927277
@@ Debug : $rc = 0   Error code: 4 time:32402.8410493021
@@ Debug : $rc = 0   Error code: 4 time:33399.6703907697
@@ Debug : $rc = 0   Error code: 4 time:34396.9241591586
@@ Debug : $rc = 0   Error code: 4 time:35394.3453432329
@@ Debug : $rc = 0   Error code: 4 time:36392.0885593138
@@ Debug : $rc = 0   Error code: 4 time:37389.1221786361
@@ Debug : $rc = 0   Error code: 4 time:38386.6631647606
@@ Debug : $rc = 0   Error code: 4 time:39384.5743085015
@@ Debug : $rc = 0   Error code: 4 time:40381.7164664334
@@ Debug : $rc = 0   Error code: 4 time:41379.6219784541
@@ Debug : $rc = 0   Error code: 4 time:42376.716010776
@@ Debug : $rc = 0   Error code: 4 time:43376.5347717771
@@ Debug : $rc = 0   Error code: 4 time:44374.2564849259
@@ Debug : $rc = 0   Error code: 4 time:45372.6647559776
@@ Debug : $rc = 60   Error code: 0 time:46509.4766493517
@@ Debug : $rc = 61   Error code: 0 time:47634.8884049023
@@ Debug : $rc = 60   Error code: 0 time:48759.906452006
@@ Debug : $rc = 62   Error code: 0 time:49880.3674134328
<<< Process finished. (Exit code 0)
================ READY ================

Unplug releave immediately, plug with large delay.

 

":ppp ifdetach intf=Internet"

Edited by Ontosy
Link to comment
Share on other sites

Win 7 32 bit works immediately for me.

Sounds like a ghost in the machine, I would start checking windows network settings.

There is workaround if you are interested in that.

While 3
    $PID = Run(@ComSpec & " /c ping www.google.com -n 1", @WorkingDir, @SW_HIDE, 2)

    While ProcessExists($PID)
        ;nothing
    WEnd

    $StringInfoFromCommandPromptWindow = StdoutRead($PID)

    If StringInStr($StringInfoFromCommandPromptWindow, "could not find") Then
        ConsoleWrite("Disconnected" & @LF)
        ContinueLoop
    EndIf
    ConsoleWrite("Connected" & @LF)
    Sleep(1000)
WEnd

 

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

It is not an issue on that configuration, nor in 64bit 3.3.14.2 in Windows 8.1. 

 

to reproduce this issue:  I need an artificial timeout and a script-breaking function tucked inside a do loop that doesnt breathe?   And then I am verifying things that may be timing issues, but sleep in the loop is not the answer because someone does it for you somewhere else?  please stop me if that is all legit and logical....

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Link to comment
Share on other sites

Ontosy,

This works for me as well. Depending on your router/modem (and ISP) behavior there is some delay between the moment you re-plug the cable and the time Windows actually enables access.

If you wait 10-20 seconds after re-plugging then no error occurs. Hence your "cached" idea doesn't hold water.

I'd close the track ticket unless you have more fuel to add.

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Link to comment
Share on other sites

Ontosy,

This works for me as well. Depending on your router/modem (and ISP) behavior there is some delay between the moment you re-plug the cable and the time Windows actually enables access.

If you wait 10-20 seconds after re-plugging then no error occurs. Hence your "cached" idea doesn't hold water.

I'd close the track ticket unless you have more fuel to add.

If this were true then why dos ping work fine?

Link to comment
Share on other sites

Not being a surgeon I've no idea what's inside AutoIt ping nor DOS ping, so I can't answer that question.

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...