Don't break if we try to "finish" a waiting CAP when it's already finished

This commit is contained in:
jesopo 2019-02-06 15:44:09 +00:00
parent c006435fa1
commit 70b29a345a

View file

@ -382,7 +382,7 @@ class Server(IRCObject.Object):
def wait_for_capability(self, capability: str):
self._capabilities_waiting.add(capability)
def capability_done(self, capability: str):
self._capabilities_waiting.remove(capability)
self._capabilities_waiting.discard(capability)
if self.cap_started and not self._capabilities_waiting:
self.send_capability_end()