After running the bot for a few days, I get this:
WARNING: Keepalive failed to send: java.net.SocketException: Socket closed
When I try to send a chat message I get:
ERROR: Unable to send packet: java.net.SocketException: Socket closed
That means you've been disconnected. Reconnect. Or, restart the bot.