Merge pull request #14 from inou/master

Handler:ondisconnect might return different reason for exit
Bumping patch to 0.8.1
Encode doesn't always returns ok