Opened 9 years ago

Closed 6 years ago

#2192 closed defect (obsolete)

When owner leaves, shared activity does not always go away on his own view (link-local)

Reported by: erikos Owned by: tomeu
Priority: Unspecified by Maintainer Milestone: Unspecified
Component: sugar-presence-service Version: 0.84.x
Severity: Unspecified Keywords:
Cc: Distribution/OS: Unspecified
Bug Status: Unconfirmed

Description

Steps to reproduce:

  • A: Share activity
  • B: Join
  • B: Leave activity ---> both neighborhood views are updated correctly (buddy leaves)
  • A: Stop shared activity ---> activity goes not away from A's neighborhood view, but goes away from B's

  • A: share another activity
  • B: join ---> on A the old shared activity goes away

Change History (6)

comment:1 Changed 9 years ago by erikos

I tracked this down to the following:

http://git.sugarlabs.org/projects/sugar-presence-service/repos/mainline/blobs/sucrose-0.84/src/activity.py#line1192

When 'A' leaves 'A' and 'B' are still in self._claimed_buddies. self_buddies only contains buddy 'A'. That means that new_buddies will contain 'B' when calling self._add_buddies(new_buddies). When we then try to remove buddy 'A' the disappeared signal is never called because the list of buddies is not empty (B has been added again).

http://git.sugarlabs.org/projects/sugar-presence-service/repos/mainline/blobs/sucrose-0.84/src/activity.py#line784

comment:2 Changed 9 years ago by erikos

  • Summary changed from When owner leaves, shared activity does not always go away on his own view to When owner leaves, shared activity does not always go away on his own view (link-local)

This is only an issue on link local. When using a jabber server for establishing the connection self._claimed_buddies does only contain the buddy of machine A and hence the activity will disappear gracefully.

comment:3 Changed 9 years ago by erikos

comment:4 Changed 9 years ago by erikos

I have compared with the behavior on gabble:

When the initiator leaves old_buddies is empty and new_buddies contains both buddies. Just because remove_buddies is called first with the old_buddies as arguments we remove the activity since there are no more buddies.

http://git.sugarlabs.org/projects/sugar-presence-service/repos/mainline/blobs/sucrose-0.84/src/activity.py#line1192

comment:5 Changed 9 years ago by erikos

http://git.sugarlabs.org/projects/sugar-presence-service/repos/mainline/blobs/sucrose-0.84/src/activity.py#line1198

Hmm, it gets even more interesting from my logs on gabble we actually send the 'disappeared' signal since the old_buddies set is empty. This removes the activity from the neighborhood view. But then, we add again the buddies (which are still in claimed_buddies) remove them and then close the channel (this is in _text_channel_closed_cb).

comment:6 Changed 6 years ago by dnarvaez

  • Resolution set to obsolete
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.