aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--discord/client.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/discord/client.py b/discord/client.py
index 73037aa8..d4207ab6 100644
--- a/discord/client.py
+++ b/discord/client.py
@@ -370,10 +370,10 @@ class Client:
func = getattr(self.connection, parser)
except AttributeError:
log.info('Unhandled event {}'.format(event))
-
- result = func(data)
- if asyncio.iscoroutine(result):
- utils.create_task(result, loop=self.loop)
+ else:
+ result = func(data)
+ if asyncio.iscoroutine(result):
+ utils.create_task(result, loop=self.loop)
@asyncio.coroutine
def _make_websocket(self, initial=True):