Slack can respond to rtm.start with migration_in_progress error, slack-bot-server should handle this error.
Looks like the best option is to wait 1 second and try to reconnect.
Example from slack-ruby-bot
https://github.com/dblock/slack-ruby-bot/blob/6ab072fbf1e34f05f5d6ea3e55cd5185b1f39769/lib/slack-ruby-bot/server.rb#L25