3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-12-23 03:02:48 +01:00

Merge pull request #643 from slingamn/issue642

fix #642
This commit is contained in:
Shivaram Lingamneni 2019-10-05 21:07:37 -07:00 committed by GitHub
commit 49ba162c76
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -1097,7 +1097,7 @@ func (client *Client) destroy(session *Session) {
// this happens under failure to return from BRB
if quitMessage == "" {
if !brbAt.IsZero() {
if brbState == BrbDead && !brbAt.IsZero() {
awayMessage := client.AwayMessage()
if awayMessage == "" {
awayMessage = "Disconnected" // auto-BRB

View File

@ -425,6 +425,7 @@ func (bt *BrbTimer) processTimeout() {
} else {
// client resumed, reattached, or has another active session
bt.state = BrbDisabled
bt.brbAt = time.Time{}
}
case BrbDead:
dead = true // shouldn't be possible but whatever