EastEriq / LAST_Messaging

Messaging framework for the LAST project
0 stars 0 forks source link

superunit.connect to a nonexisting host connects reports success, with data of the preceding one #9

Closed EastEriq closed 1 month ago

EastEriq commented 1 month ago

E.g.

S = 

  superunit with properties:

         UnitHosts: {'last01e'  'last02e'  'last03e'  'last04e'  'last05e'  'last06e'  'last07e'  'last08e'  'last09e'  'last10e'}
      UnitTerminal: 'silentx'
    SlaveTerminals: 'silentx'
       RemoteUnits: [1x10 obs.util.SpawnedMatlab]
           Logging: 1
        LoggingDir: '~/log'

>> S.connect
{08:41:50.101|obs.util.SpawnedMatlab[master08]} connection with session master08 not estabilished, aborting

ans =

  1x10 logical array

   1   1   1   1   1   1   1   0   1   1

>> [S.RemoteUnits([6,7,9]).PID]

ans =

     1359362     1359362     1359362
>> S.RemoteUnits(7).Messenger  

ans = 

  Messenger with properties:

      DestinationHost: ''
      DestinationPort: 11000
            LocalPort: 41735
    EnablePortSharing: 'on'
                 Name: 'localhost:->:11000'
         MessagesSent: 8

>> S.RemoteUnits(7).Messenger.whoIsThere

ans =

    'localhost:11000->10.23.1.25:50001'

NB the units were previously connected to a superunit on last0, this explains the name with 1.25, and possibly creates a side effect.

EastEriq commented 1 month ago
>> S.RemoteUnits(7).Messenger.StreamResource

   UDP Object : localhost:->:11000

   Communication Settings 
      RemotePort:         11000
      RemoteHost:         127.0.0.1
      Terminator:         'LF'

   Communication State 
      Status:             open
      RecordStatus:       off

   Read/Write State  
      TransferStatus:     idle
      BytesAvailable:     0
      ValuesReceived:     1257
      ValuesSent:         2208

It's perhaps a side consequence of some assumption no host = localhost. I'm not sure it is paramount to deal with now, however problem noted.

Ah, did I mention that I got this creating a superunit on last06e which has already a spawned unit running? Monument to creating myself nonissues.