Skip to content

Commit

Permalink
reinit buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
nniclausse committed Jul 4, 2006
1 parent b8dd041 commit 3f9d2b3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/mdb_connection.erl
Expand Up @@ -56,12 +56,12 @@ connect(Server, Ip_port) ->

case Connect() of
{ok, Sock} ->
mdb_logger:debug("Connected to: ~p", [Server]),
mdb_logger:debug("Connected to: ~p~n", [Server]),
{ok, Sock};

{error, Reason} ->
%% If there is an error, wait 30 secondes and try to reconnect
mdb_logger:warn("Server connection error: ~p", [Reason]),
mdb_logger:warn("Server connection error: ~p~n", [Reason]),
timer:sleep(30000),
connect(Server, Ip_port)
end.
Expand Down Expand Up @@ -103,5 +103,6 @@ manage_reconnect(State) ->

{ok, State#state{socket = Sock,
date = calendar:local_time(),
buffer = << >>,
joined = false
}}.

0 comments on commit 3f9d2b3

Please sign in to comment.