Skip to content

Commit

Permalink
Fixed issue wooga#28: The sub socket was incorrectly set to resulting…
Browse files Browse the repository at this point in the history
… in the socket sending more messages than wanted. At large volumes of messages, we get into a situation where we can no longer handle the messages fast enough. Thanks to pmembrey for reporting.
  • Loading branch information
knutin committed May 31, 2012
1 parent 06ce724 commit 4d35fcc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# CHANGELOG

## v1.0.2

* Fixed bug in eredis_sub where the socket was incorrectly set to
`{active, once}` twice. At large volumes of messages, this resulted
in too many messages from the socket and we would be unable to keep
up.

## v1.0

* Support added for pubsub thanks to Dave Peticolas
Expand Down Expand Up @@ -28,4 +35,4 @@
* Configurable reconnect sleep time, by Valentino Volonghi (dialtone)

* Support for using eredis as a poolboy worker, by Valentino Volonghi
(dialtone)
(dialtone)
2 changes: 1 addition & 1 deletion src/eredis.app.src
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{application, eredis, [
{description, "Erlang Redis Client"},
{vsn, "1.0.1"},
{vsn, "1.0.2"},
{modules, []},
{registered, []},
{applications, [kernel, stdlib]}
Expand Down
1 change: 0 additions & 1 deletion src/eredis_sub_client.erl
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,6 @@ handle_response(Data, #state{parser_state = ParserState} = State) ->
handle_response(Rest, NewState);

{continue, NewParserState} ->
inet:setopts(State#state.socket, [{active, once}]),
State#state{parser_state = NewParserState}
end.

Expand Down

0 comments on commit 4d35fcc

Please sign in to comment.