Having created a pubsub for asynchronous redis, when it's time to close it using aclose, this function calls await self.connection.disconnect() which in turn calls await self._writer.wait_closed(). At this point, it just hangs and doesn't do anything. My work around currently is to first call disconnect with nowait=True i.e. await pubsub.connection.disconnect(nowait=True) but this is hacky.