Skip to content
This repository was archived by the owner on May 27, 2019. It is now read-only.

Many improvements #5

Open
wants to merge 31 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
9cc8a26
Support GET endpoints too
lucaspiller May 5, 2013
729cb64
Pass in auth rather than headers to client and manager
lucaspiller May 5, 2013
ca28a6d
Merge remote-tracking branch 'origin/master' into oauth
lucaspiller May 5, 2013
ff9d9e7
Test more Erlang versions
lucaspiller May 5, 2013
edccbc9
Point to newer Jiffy to overcome compilation error
Dec 10, 2013
af47be7
Update Twitter filter URL to point to the 1.1 API
Dec 10, 2013
5717124
Implement OAuth in the streaming API. Currently only POST support.
Dec 10, 2013
49d4d48
Prefix erlang module names with twerl_.
Dec 10, 2013
a23c7b6
Rename spec files to twerl_
Dec 10, 2013
0a2642b
Tweaks to spec
Dec 10, 2013
c2c8cd9
Implement reconnect after error.
Dec 10, 2013
8587911
When setting auth without client connection, do not start connection
Jan 21, 2014
f250e62
Make GET requests work with OAuth
Feb 11, 2014
e08d5ab
Add user stream URL helper fn
Feb 11, 2014
e34b214
Make stream endpoint configurable through the manager
Feb 11, 2014
542d674
Fix endpoint
Feb 11, 2014
562859a
Add debug statements for showing connection process
Feb 11, 2014
a6d23bb
Prevent crash in client shutdown
Feb 12, 2014
e77f13b
Prevent invalid set_endpoint calls
Feb 13, 2014
9f490ce
Prevent crash on decoding truncated json
Feb 17, 2014
3cd978f
Make Twerl manager more reliable on reconnect, do not reconnect twice
Mar 17, 2014
2de62e3
Fix bug with duplicate stream starting
Mar 18, 2014
2b7b9d5
Twitter JSON messages are split by \r\n
May 26, 2014
c54e9ba
Do not try to decode empty messages
May 26, 2014
a58555e
More separator optimizations
May 26, 2014
8ba505a
Remove R14 as Espec doesn't support it
May 27, 2014
acef585
Use new meck
Jun 10, 2014
206a2c8
Add jiffy and oauth to the twerl deps for building a proper release
Jun 10, 2014
db2d7f5
Cancel the httpc request when we do a voluntary shutdown
Jul 13, 2014
d415592
Recurse handling data, handle cases for multiple messages in single p…
Jul 13, 2014
19608ce
Fix Erlang 18 compilation
Mar 21, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Prevent invalid set_endpoint calls
Arjan Scherpenisse committed Feb 13, 2014

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit e77f13bc2262d5155748274ce3aedac87c2e83d9
7 changes: 4 additions & 3 deletions src/twerl_stream_manager.erl
Original file line number Diff line number Diff line change
@@ -111,10 +111,10 @@ handle_call(stop_stream, _From, State) ->
handle_call({set_endpoint, E}, _From, State=#state{params=E}) ->
%% same, don't do anything
{reply, ok, State};
handle_call({set_endpoint, E}, _From, State=#state{client_pid=undefined}) ->
handle_call({set_endpoint, {_,_}=E}, _From, State=#state{client_pid=undefined}) ->
%% set endpoint without client connection
{reply, ok, State#state{ endpoint = E }};
handle_call({set_endpoint, E}, _From, State) ->
{reply, ok, State#state{endpoint=E}};
handle_call({set_endpoint, {_,_}=E}, _From, State) ->
%% change and restart the client
ok = client_shutdown(State),
NewState = client_connect(State#state{endpoint=E}),
@@ -151,6 +151,7 @@ handle_call(status, _From, State = #state{status = Status}) ->
{reply, Status, State};

handle_call(_Request, _From, State) ->
lager:warning("Unknown call: ~p", [_Request]),
{reply, ok, State}.

%%--------------------------------------------------------------------