race condition when chatter initializes
---------------------------------------

                 Key: CDV-543
                 URL: https://jira.terracotta.org/jira//browse/CDV-543
             Project: Community Development
          Issue Type: Bug
            Reporter: Taylor Gautier
            Assignee: Issue Review Board


046 public class Main extends JFrame implements ActionListener, ChatterDisplay,
047       WindowListener {
048 
049    private final ChatManager chatManager = new ChatManager();
050 
051    private final JTextPane display = new JTextPane();
052 
053    private User user;
054 
055    private final JList buddyList = new JList();
056 
057    private boolean isServerDown = false;
058    private static final String CHATTER_SYSTEM = "SYSTEM";
059 
060    public Main() {
061       try {
062          final String nodeId = registerForNotifications();
063          user = new User(nodeId, this);
064          populateCurrentUsers();
065          login();
066       }

between lines 49 and 65, there is a race - since the login method sets up a 
local listener for all chat events, it's easy to lose the other client login if 
execution of 1 node is between 49 and 65, and the other completes 65 (the login 
process)


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://jira.terracotta.org/jira//secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        
_______________________________________________
tc-dev mailing list
[email protected]
http://lists.terracotta.org/mailman/listinfo/tc-dev

Reply via email to