Created
March 30, 2016 00:35
-
-
Save NelsonMinar/7e52fdb8e5b1e2d3b15b70eb3f5ae586 to your computer and use it in GitHub Desktop.
Demo program for a small bug with discord.py closing sessions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Demo of a bug in discord.py 0.10.0-alpha (tested with 53a240e) | |
# This program causes the following error to be printed when Python exits | |
# Unclosed client session | |
# client_session: <aiohttp.client.ClientSession object at 0x7f3bd7a83358> | |
import discord | |
c = discord.Client() | |
c.close() | |
# Adding this line seems to fix the problem | |
# c.session.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment