Closed
Bug 953675
Opened 11 years ago
Closed 11 years ago
Don't treat accounts immeadiately as connected
Categories
(Chat Core :: General, defect)
Chat Core
General
Tracking
(Not tracked)
RESOLVED
FIXED
0.2b1
People
(Reporter: benediktp, Assigned: romain)
References
Details
Attachments
(1 file, 1 obsolete file)
6.81 KB,
patch
|
florian
:
review+
|
Details | Diff | Splinter Review |
*** Original post on bio 229 at 2009-08-29 10:25:00 UTC ***
Right now the facebook protocol plugin keeps reconnecting all the time, with the timer starting anew from one second. It's looks like it's connected for a short moment, so I guess we (or is it libpurple?) are taking it as properly connected and reset the reconnect timer.
Someone (Eventreur?) proposed to wait for e.g. ten seconds before treating an account as properly connected.
Reporter | ||
Updated•11 years ago
|
Summary: Failing to connect → Don't treat accounts immeadiately as connected
Assignee | ||
Comment 1•11 years ago
|
||
*** Original post on bio 229 as attmnt 230 at 2009-08-30 19:05:00 UTC ***
Add a member in purpleIAccount to keep the last time the account was successfully connected.
Used to check if a disconnect with error occurred within the 10 seconds after this timestamp.
I have also exposed this timestamp, it can be a useful information for Javascript.
Attachment #8351974 -
Flags: review?(florian)
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → romain
Status: NEW → ASSIGNED
Assignee | ||
Updated•11 years ago
|
Severity: normal → minor
OS: Windows XP → All
Hardware: x86 → All
Target Milestone: --- → 0.2b1
Comment 2•11 years ago
|
||
Comment on attachment 8351974 [details] [diff] [review]
Patch V1
*** Original change on bio 229 attmnt 230 at 2009-08-30 20:28:32 UTC ***
>diff --git a/purple/purplexpcom/public/purpleIAccount.idl b/purple/purplexpcom/public/purpleIAccount.idl
>+ /* Time stamp of the last connection */
>+ readonly attribute PRInt64 timeOfLastConnect;
The comment here should at least state that the value is unreliable when the account is not connected.
>diff --git a/purple/purplexpcom/src/purpleAccount.cpp b/purple/purplexpcom/src/purpleAccount.cpp
>@@ -1095,16 +1097,23 @@ void purpleAccount::SetDisconnectReason(
>+ // If the last successful connection is older than 10 seconds, reset the
>+ // number of reconnection attemps.
>+ if (mTimeOfLastConnect && mTimeOfLastConnect + 10 * PR_USEC_PER_SEC < PR_Now()) {
>+ mReconnectAttempts = 0;
>+ mTimeOfLastConnect = 0;
>+ }
The value 10 here should be an explicitly named constant with a #define at the beginning of this file.
Looks good otherwise!
Attachment #8351974 -
Flags: review?(florian) → review+
Assignee | ||
Comment 3•11 years ago
|
||
*** Original post on bio 229 as attmnt 231 at 2009-08-30 20:53:00 UTC was without comment, so any subsequent comment numbers will be shifted ***
Attachment #8351975 -
Flags: review?(florian)
Assignee | ||
Comment 4•11 years ago
|
||
Comment on attachment 8351974 [details] [diff] [review]
Patch V1
*** Original change on bio 229 attmnt 230 at 2009-08-30 20:53:19 UTC was without comment, so any subsequent comment numbers will be shifted ***
Attachment #8351974 -
Attachment is obsolete: true
Comment 5•11 years ago
|
||
Comment on attachment 8351975 [details] [diff] [review]
Patch V2
*** Original change on bio 229 attmnt 231 at 2009-08-31 01:27:30 UTC was without comment, so any subsequent comment numbers will be shifted ***
Attachment #8351975 -
Flags: review?(florian) → review+
Comment 6•11 years ago
|
||
*** Original post on bio 229 at 2009-08-31 01:31:22 UTC ***
https://hg.instantbird.org/instantbird/rev/04b066f0073c
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•