shizmob / pydle

An IRCv3-compliant Python 3 IRC library.
BSD 3-Clause "New" or "Revised" License
154 stars 48 forks source link

Fix stopping the connection #100

Closed Harmon758 closed 5 years ago

Harmon758 commented 5 years ago

Properly schedules stopping the event loop Fixes #99

Harmon758 commented 5 years ago

Err, what's the change?

theunkn0wn1 commented 5 years ago

0.o im sorry, it seems my suggestion comment on the review got dropped.

basically drop the lambda expression.


self.eventloop.call_soon(self.eventloop.stop)

I don't see any reason for having a lambda here, and it only seems to increase complexity. Since we are touching this line anyways, we may as well remove it.

I did a small test and it behaves the same with and without the lambda

Harmon758 commented 5 years ago

Yeah, it's unnecessary. Done.