From 6439ce3fa3a58150b88f074c5498627b7e14f79a Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Mon, 15 Apr 2013 21:32:28 +1200 Subject: Increase session timeout --- src/org/traccar/web/server/model/DataServiceImpl.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/org/traccar/web/server/model') diff --git a/src/org/traccar/web/server/model/DataServiceImpl.java b/src/org/traccar/web/server/model/DataServiceImpl.java index eb466694..c2ebce15 100644 --- a/src/org/traccar/web/server/model/DataServiceImpl.java +++ b/src/org/traccar/web/server/model/DataServiceImpl.java @@ -108,7 +108,11 @@ public class DataServiceImpl extends RemoteServiceServlet implements DataService private User getSessionUser() { HttpSession session = getThreadLocalRequest().getSession(); - return (User) session.getAttribute(ATTRIBUTE_USER); + User user = (User) session.getAttribute(ATTRIBUTE_USER); + if (user == null) { + throw new IllegalStateException(); + } + return user; } @Override -- cgit v1.2.3