google-code-export / emite

Automatically exported from code.google.com/p/emite
1 stars 0 forks source link

Nasty behaviour when you go offline with some conversations open #77

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Go online
2. Start a conversation, and write something to a roster item
3. Go offline

What is the expected output? What do you see instead?

Some empty docked chats and the info panel visible but not active. 

Original issue reported on code.google.com by vruiz.ju...@gmail.com on 25 May 2008 at 5:14

GoogleCodeExporter commented 9 years ago
Is a NPE:

[DEBUG] STATE - NOT SEND: Empty request and connections running (1)
[DEBUG] Dispatching: <event xmlns="emite:event" type="session:on:logout" />
[DEBUG] DISPATCH BEGINS >>>>>>>>>>>
[DEBUG] Dispatching: <event xmlns="emite:event" type="bosh-manager:do:stop" />
[INFO] STATE CHANGED: disconnected - old: connected
[DEBUG] ERROR EVENTjava.lang.NullPointerException
[INFO] STATE CHANGED: error - old: disconnected

Original comment by vruiz.ju...@gmail.com on 27 May 2008 at 2:43

GoogleCodeExporter commented 9 years ago
This is because ChatManagerDefault in logOut method do a close to all opened 
Chats
(and all the ChatUI objects stored in the chats are affected via
MCP.doAfterChatClosed chatUI.destroy).

Imagine: you are in some conversations, and if you go offline (for any reason), 
you
close and lost all the chat/room tabs, and you need to start again...

A behaviour proposal (easily to code):
- you go offline
- all the chats/chatsUI opened are locked (you have a chat variable o a Data 
class
that reflect this).
- if yo go online (with the same user/resource) all the chats/chatUIs are 
unlocked
- All the chatUIs tabs and history are not affected

This will fix issue #41 also (you maintain locked all opened chats if you are 
login
with a different user).

Comments?

PS: Now I can't see the NPE anymore, maybe it was related to my NPE tests

Original comment by vruiz.ju...@gmail.com on 28 May 2008 at 1:10

GoogleCodeExporter commented 9 years ago
Fixed

Original comment by vruiz.ju...@gmail.com on 29 May 2008 at 1:05

GoogleCodeExporter commented 9 years ago

Original comment by danigb on 29 May 2008 at 2:28