Skip to content

Commit

Permalink
We can't set disconnected status until AFTER we have terminated OTR c…
Browse files Browse the repository at this point in the history
…onversations
  • Loading branch information
olabini committed Aug 15, 2017
1 parent 5432a0d commit c596d07
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions session/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -992,15 +992,16 @@ func (s *session) Close() {
return
}

s.setStatus(DISCONNECTED)

conn := s.conn
if conn != nil {
if !s.wantToBeOnline {
s.terminateConversations()
}
s.setStatus(DISCONNECTED)
conn.Close()
s.conn = nil
} else {
s.setStatus(DISCONNECTED)
}
}

Expand Down

0 comments on commit c596d07

Please sign in to comment.