diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/lleventpoll.cpp | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/linden/indra/newview/lleventpoll.cpp b/linden/indra/newview/lleventpoll.cpp index 6b95102..995c4e4 100644 --- a/linden/indra/newview/lleventpoll.cpp +++ b/linden/indra/newview/lleventpoll.cpp | |||
@@ -4,7 +4,7 @@ | |||
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2006&license=viewergpl$ | 5 | * $LicenseInfo:firstyear=2006&license=viewergpl$ |
6 | * | 6 | * |
7 | * Copyright (c) 2006-2008, Linden Research, Inc. | 7 | * Copyright (c) 2006-2009, Linden Research, Inc. |
8 | * | 8 | * |
9 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
10 | * The source code in this file ("Source Code") is provided by Linden Lab | 10 | * The source code in this file ("Source Code") is provided by Linden Lab |
@@ -31,9 +31,9 @@ | |||
31 | 31 | ||
32 | #include "llviewerprecompiledheaders.h" | 32 | #include "llviewerprecompiledheaders.h" |
33 | 33 | ||
34 | #include "lleventpoll.h" | ||
34 | #include "llappviewer.h" | 35 | #include "llappviewer.h" |
35 | #include "llagent.h" | 36 | #include "llagent.h" |
36 | #include "lleventpoll.h" | ||
37 | 37 | ||
38 | #include "llhttpclient.h" | 38 | #include "llhttpclient.h" |
39 | #include "llhttpstatuscodes.h" | 39 | #include "llhttpstatuscodes.h" |
@@ -41,6 +41,7 @@ | |||
41 | #include "lltimer.h" | 41 | #include "lltimer.h" |
42 | #include "llviewerregion.h" | 42 | #include "llviewerregion.h" |
43 | #include "message.h" | 43 | #include "message.h" |
44 | #include "lltrans.h" | ||
44 | 45 | ||
45 | namespace | 46 | namespace |
46 | { | 47 | { |
@@ -225,11 +226,15 @@ namespace | |||
225 | // They are essentially disconnected from the region even though some things may still work. | 226 | // They are essentially disconnected from the region even though some things may still work. |
226 | // Since things won't get better until they relog we force a disconnect now. | 227 | // Since things won't get better until they relog we force a disconnect now. |
227 | 228 | ||
228 | // *NOTE:Mani - This force disconnect was causing logouts even when disconnected | 229 | // *NOTE:Mani - The following condition check to see if this failing event poll |
229 | // from neighboring regions. | 230 | // is attached to the Agent's main region. If so we disconnect the viewer. |
230 | // *FIX:Mani We may want to re enable forceDisconnect for the agents main region. | 231 | // Else... its a child region and we just leave the dead event poll stopped and |
231 | // *FIX:Mani If reimplemting Translate!!!! | 232 | // continue running. |
232 | // LLAppViewer::instance()->forceDisconnect("You have been disconnected from the region you were in."); | 233 | if(gAgent.getRegion() && gAgent.getRegion()->getHost().getIPandPort() == mSender) |
234 | { | ||
235 | llwarns << "Forcing disconnect due to stalled main region event poll." << llendl; | ||
236 | LLAppViewer::instance()->forceDisconnect(LLTrans::getString("AgentLostConnection")); | ||
237 | } | ||
233 | } | 238 | } |
234 | } | 239 | } |
235 | 240 | ||