Improve the error loging to know which bot cannot write the the socket. Try to reconnect this bot instead of just calling bot.Close()