Permalink
Browse files

Show the session info in the event of a timeout

  • Loading branch information...
1 parent 3810905 commit 4319ba98f3f8c2030bf70c50dfce4f67d0975582 @msantos committed Sep 17, 2010
Showing with 11 additions and 3 deletions.
  1. +11 −3 src/pervon.erl
View
14 src/pervon.erl
@@ -128,9 +128,17 @@ perving({data, {SeqNo, Data}}, _From, #state{data = Payload} = State) ->
perving(stop, _From, State) ->
{reply, ok, archiving, State, 0}.
-perving(timeout, State) ->
- error_logger:info_report([{timeout, ?TIMEOUT}]),
- {next_state, archiving, State, 0}.
+perving(timeout, #state{
+ saddr = Saddr,
+ sport = Sport,
+ daddr = Daddr,
+ dport = Dport
+ } = State) ->
+ error_logger:info_report([
+ {session, {timeout, ?TIMEOUT}},
+ {connection, session(Saddr, Sport, Daddr, Dport)}
+ ]),
+ {next_state, archiving, State, 10000}.
archiving(timeout, #state{
saddr = Saddr,

0 comments on commit 4319ba9

Please sign in to comment.