uperl / AnyEvent-WebSocket-Client

WebSocket client for AnyEvent
9 stars 10 forks source link

Bug fix: prevent recursive call to "finish" callbacks #15

Closed debug-ito closed 11 years ago

debug-ito commented 11 years ago

In some rare and stupid situations, "finish" callbacks can be called recursively (see the test). This patch fixes the bug by introducing _is_finished flag attribute.

Now that _is_finished flag ensures the finish callbacks are called only once, I removed the code that cleared _finish_cb. So the behavior is rolled back to versions <= 0.18

plicease commented 11 years ago

Merged and pushed to CPAN as 0.20, thanks again!