Bukkit/CraftBukkit — pull request #624 by Evenprime (2012-01-11 01:11:56+00:00)
Title: Stop processing incoming packets after disconnect

After a player gets kicked/disconnected, there may still be packets left in the receiving queue (or even added to the queue by the asynchronous receiving thread) for a short time.

This will prevent those packets from getting processed, generically fixing problems like all kinds of "leave" and packet spam.