Commits

Jacob Perkins  committed 4229cb8

transparent reconnect fix in erldis_client (via Benjamin Black), vsn 0.1.3

  • Participants
  • Parent commits 7db71d3

Comments (0)

Files changed (3)

File ebin/erldis.app

 {application, erldis, [
 	{description, "Erlang Redis application"},
-	{vsn, "0.1.2"},
+	{vsn, "0.1.3"},
 	{registered, [erldis_sup]},
 	{mod, {erldis_app, []}},
 	{applications, [kernel, stdlib]},

File ebin/erldis.appup

-{"0.1.2", [
+{"0.1.3", [
+	{"0.1.2", [{load_module, erldis_client}]},
 	{"0.1.1", [
 		{load_module, erldis},
 		{load_module, erldis_client},
 		{add_module, erldis_sets}
 	]}
 ], [
+	{"0.1.2", [{load_module, erldis_client}]},
 	{"0.1.1", [
 		{load_module, erldis},
 		{load_module, erldis_client},

File src/erldis_client.erl

 			Report = [{?MODULE, unable_to_connect}, {error, Why}, State],
 			error_logger:warning_report(Report),
 			State;
-		{ok, #redis{socket=Socket, _='_'}=NewState} ->
+		{ok, NewState} ->
+			Socket = NewState#redis.socket,
+			
 			if
 				DB == <<"0">> ->
 					ok;
 	gen_tcp:send(State#redis.socket, [Cmd|End]),
 	
 	case Remaining of
-		0 ->
-			{noreply, State#redis{remaining=1, calls=Queue}};
-		_ ->
-			{noreply,State#redis{calls=Queue}}
+		0 -> {noreply, State#redis{remaining=1, calls=Queue}};
+		_ -> {noreply, State#redis{calls=Queue}}
 	end;
 handle_cast(_, State) ->
 	{noreply, State}.