Send CAP END when we're not waiting for any capability handshakes
This commit is contained in:
parent
29851d4305
commit
0f578b1ec1
2 changed files with 5 additions and 0 deletions
|
@ -267,6 +267,9 @@ class LineHandler(object):
|
|||
event["server"].send_capability_queue()
|
||||
else:
|
||||
event["server"].send_capability_end()
|
||||
elif subcommand == "ack" or subcommand == "nack":
|
||||
if not event["server"].waiting_for_capabilities():
|
||||
event["server"].send_capability_end()
|
||||
|
||||
# the server is asking for authentication
|
||||
def authenticate(self, event):
|
||||
|
|
|
@ -293,6 +293,8 @@ class Server(object):
|
|||
def send_authenticate(self, text):
|
||||
self.send("AUTHENTICATE %s" % text)
|
||||
|
||||
def waiting_for_capabilities(self):
|
||||
return bool(len(self._capabilities_waiting))
|
||||
def wait_for_capability(self, capability):
|
||||
self._capabilities_waiting.add(capability)
|
||||
def capability_done(self, capability):
|
||||
|
|
Loading…
Reference in a new issue