Skip to content

Commit

Permalink
Merge pull request #51 from dawei101/session_duration
Browse files Browse the repository at this point in the history
set session last nano time when read
  • Loading branch information
dawei101 authored Oct 22, 2017
2 parents edc3bd3 + 4759cb5 commit 0c38e59
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ public class NatSessionManager {
static final SparseArray<NatSession> Sessions = new SparseArray<NatSession>();

public static NatSession getSession(int portKey) {
NatSession session = Sessions.get(portKey);
if (session!=null) {
session.LastNanoTime = System.nanoTime();
}
return Sessions.get(portKey);
}

Expand Down

0 comments on commit 0c38e59

Please sign in to comment.