Icon View Thread

The following is the text of the current message along with any replies.
Messages 21 to 22 of 22 total
Thread Disconnecting Users in Remote Sessions.
Mon, Apr 8 2013 4:55 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Barry,

<< When I am in the debugger too long the session is being removed. >>

That's a different issue.  When you're in the debugger and the execution is
paused on a breakpoint, then no code will get executed, including the
pinging thread in the EDB client.  Therefore, the session on the server will
timeout no matter what after a period of time.

<< For instance, shouldn't the code be setting MySession.Connected := true;
someplace so it creates the new session? After all, if the old session was
lost on the server, don't I have to create a new session?  >>

Sorry, I forgot to mention that you need to also set
MySession.Connected:=True right after setting Connected to False.  That
should do the trick:

procedure TdmMain.AppException(Sender: TObject; E: Exception);
 begin
   if Assigned(E) then
     if (E is EDatabaseError) and (E is EEDBError) then
       begin
         if EEDBError(E).ErrorCode=EDB_Error_SessionNotFound then
           begin
             SessionGone         := true;
             MySession.Connected := false;
             MySession.Connected := true;
           end;
       end;
 end;

Tim Young
Elevate Software
www.elevatesoft.com
Mon, Apr 8 2013 5:23 PMPermanent Link

Barry

"Tim Young [Elevate Software]" wrote:

Barry,

<< When I am in the debugger too long the session is being removed. >>

<That's a different issue.  When you're in the debugger and the execution is
paused on a breakpoint, then no code will get executed, including the
pinging thread in the EDB client.  Therefore, the session on the server will
timeout no matter what after a period of time.>

Correct.

<< For instance, shouldn't the code be setting MySession.Connected := true;
someplace so it creates the new session? After all, if the old session was
lost on the server, don't I have to create a new session?  >>

<Sorry, I forgot to mention that you need to also set
MySession.Connected:=True right after setting Connected to False.  That
should do the trick:>

That's what I thought. Thanks.

Barry
« Previous PagePage 3 of 3
Jump to Page:  1 2 3
Image