@@ -1210,14 +1210,16 @@ def client_kill(self, address):
1210
1210
"Disconnects the client at ``address`` (ip:port)"
1211
1211
return self .execute_command ('CLIENT KILL' , address )
1212
1212
1213
- def client_kill_filter (self , _id = None , _type = None , addr = None , skipme = None ):
1213
+ def client_kill_filter (self , _id = None , _type = None , addr = None ,
1214
+ skipme = None , laddr = None ):
1214
1215
"""
1215
1216
Disconnects client(s) using a variety of filter options
1216
1217
:param id: Kills a client by its unique ID field
1217
1218
:param type: Kills a client by type where type is one of 'normal',
1218
1219
'master', 'slave' or 'pubsub'
1219
1220
:param addr: Kills a client by its 'address:port'
1220
1221
:param skipme: If True, then the client calling the command
1222
+ :param laddr: Kills a cient by its 'local (bind) address:port'
1221
1223
will not get killed even if it is identified by one of the filter
1222
1224
options. If skipme is not provided, the server defaults to skipme=True
1223
1225
"""
@@ -1239,6 +1241,8 @@ def client_kill_filter(self, _id=None, _type=None, addr=None, skipme=None):
1239
1241
args .extend ((b'ID' , _id ))
1240
1242
if addr is not None :
1241
1243
args .extend ((b'ADDR' , addr ))
1244
+ if laddr is not None :
1245
+ args .extend ((b'LADDR' , laddr ))
1242
1246
if not args :
1243
1247
raise DataError ("CLIENT KILL <filter> <value> ... ... <filter> "
1244
1248
"<value> must specify at least one filter" )
0 commit comments