How to handle connection timeouts?

6 views
Skip to first unread message

MrBlankman

unread,
Jan 29, 2011, 8:45:30 AM1/29/11
to mini_fb
I'm finding that a number of requests seem to stall or timeout on
facebook. Is anyone else seeing this and, if so, how are you handling
it? Is there a way to t a timeout with mini_FB to catch a facebook
stall and act?

Travis Reeder

unread,
Feb 8, 2011, 12:01:14 AM2/8/11
to min...@googlegroups.com
Wrap it in a timeout block:

require 'timeout'
  status = Timeout::timeout(5) {
    # Something that should be interrupted if it takes too much time...
  }


Reply all
Reply to author
Forward
0 new messages