Changeset 1821


Ignore:
Timestamp:
11/13/14 15:23:46 (10 years ago)
Author:
pharms
Message:
  • bugfix for duplicate client ids
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/autoquest-htmlmonitor/src/main/java/de/ugoe/cs/autoquest/htmlmonitor/HtmlMonitorLogManager.java

    r1746 r1821  
    119119                              HtmlEvent[]     events) 
    120120    { 
    121         HtmlMonitorOutputWriter writer = writers.get(clientInfos.getClientId()); 
     121        HtmlMonitorOutputWriter writer = 
     122            writers.get(clientInfos.getClientId() + clientInfos.getUrl()); 
    122123         
    123124        try { 
    124125            if (writer == null) { 
    125126                synchronized (this) { 
    126                     writer = writers.get(clientInfos.getClientId()); 
     127                    writer = writers.get(clientInfos.getClientId() + clientInfos.getUrl()); 
    127128                    if (writer == null) { 
    128129                        writer = new HtmlMonitorOutputWriter 
     
    132133                        writer.init(); 
    133134                        writer.start(); 
    134                         writers.put(clientInfos.getClientId(), writer); 
     135                        writers.put(clientInfos.getClientId() + clientInfos.getUrl(), writer); 
    135136                    } 
    136137                } 
     
    147148            // determine, if the writer exists but is not able to log something. In this case, 
    148149            // destroy the writer (part of the message may be logged twice through this). 
    149             writer = writers.get(clientInfos.getClientId()); 
     150            writer = writers.get(clientInfos.getClientId() + clientInfos.getUrl()); 
    150151            if (writer != null) { 
    151152                try { 
     
    154155                catch (Exception e1) { 
    155156                    synchronized (this) { 
    156                         writers.remove(clientInfos.getClientId()); 
     157                        writers.remove(clientInfos.getClientId() + clientInfos.getUrl()); 
    157158                        writer.stop(); 
    158159                    } 
     
    186187                } 
    187188                 
    188                 for (String clientId : timeoutSessions) { 
    189                     HtmlMonitorOutputWriter writer = writers.remove(clientId); 
     189                for (String sessionId : timeoutSessions) { 
     190                    HtmlMonitorOutputWriter writer = writers.remove(sessionId); 
    190191                    writer.stop(); 
    191192                } 
Note: See TracChangeset for help on using the changeset viewer.