Announcement

Collapse
No announcement yet.

Error when Running a scripts for GC100. Please send your ideas.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Error when Running a scripts for GC100. Please send your ideas.

    I have a GC-100 that over time stops working. When I restart HS, the script works fine for a while. Then at some point, there is a problem. The script returns successful results, but the action intended does not occur and the following error is in the log.

    The error is:
    Global Cache Serial Error: Once the socket has been disconnected, you can only reconnect again asynchronously, and only to a different EndPoint. BeginConnect must be called on a thread that won't exit until the operation has been completed.

    The script is:
    Sub SendData(strData)
    hs.WriteLog "Debug", "Starting SendData Script"
    DIM GC
    DIM SerIdx
    DIM SerResult
    DIM cmd
    Set GC = Nothing
    Set GC = hs.Plugin("Global Cache GC100")
    if GC is Nothing then Exit Sub
    hs.WriteLog "Debug", "Got the plugin"
    SerIdx = GC.GetSerialIndex("192.168.1.71", 1)
    hs.WriteLog "Debug", "Serial Index "+ Cstr(SerIdx)
    if SerIdx = -1 then Exit Sub
    hs.WriteLog "Info", "Got the serial Index"
    cmd = strData + vbCr
    SerResult = GC.SendSerialData(SerIdx, cmd)
    hs.WriteLog "Debug", "Think I've changed it (" + Cstr(SerResult) + ")"

    End Sub
Working...
X