Skip to content

Commit 851856e

Browse files
author
Timoses
committed
Detect multiple attached clients in attached_sessions
Removes limitation of Server.attached_sessions to not being able to detect multiple attached clients
1 parent 7198957 commit 851856e

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

libtmux/server.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -319,8 +319,6 @@ def attached_sessions(self):
319319
"""
320320
Return active :class:`Session` objects.
321321
322-
This will not work where multiple tmux sessions are attached.
323-
324322
Returns
325323
-------
326324
list of :class:`Session`
@@ -332,7 +330,7 @@ def attached_sessions(self):
332330
for session in sessions:
333331
attached = session.get('session_attached')
334332
# for now session_active is a unicode
335-
if attached == '1':
333+
if attached != '0':
336334
logger.debug('session %s attached', session.get('name'))
337335
attached_sessions.append(session)
338336
else:

0 commit comments

Comments
 (0)