Commit b8508063 authored by Laust Rud Jacobsen's avatar Laust Rud Jacobsen
Browse files

Adding a bit of documentation for the .on_no_data callback

parent 6650484a
......@@ -32,6 +32,11 @@ JSON format only.
stream.on_max_reconnects do |timeout, retries|
# Something is wrong on your side. Send yourself an email.
end
stream.on_no_data do
# Twitter has stopped sending any data on the currently active
# connection, reconnecting is probably in order
end
}
......
......@@ -90,6 +90,8 @@ module Twitter
@reconnect_callback = block
end
# Called when no data has been received for NO_DATA_TIMEOUT seconds.
# Reconnecting is probably in order as per the Twitter recommendations
def on_no_data &block
@no_data_callback = block
end
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment