Fix nullpointer on empty message
This commit is contained in:
parent
2d03ccbe3e
commit
a78723825b
1 changed files with 1 additions and 1 deletions
|
@ -28,6 +28,7 @@ public class EventSSE{
|
||||||
locker.init(key);
|
locker.init(key);
|
||||||
try {
|
try {
|
||||||
while(true){
|
while(true){
|
||||||
|
locker.lock(key);
|
||||||
GroupMessage message = locker.getValue(key);
|
GroupMessage message = locker.getValue(key);
|
||||||
if(message.getGroup() == null || message.getGroup().equals(group)){
|
if(message.getGroup() == null || message.getGroup().equals(group)){
|
||||||
JsonMap send = new JsonMap();
|
JsonMap send = new JsonMap();
|
||||||
|
@ -35,7 +36,6 @@ public class EventSSE{
|
||||||
writer.write(send.toString()+"\n");
|
writer.write(send.toString()+"\n");
|
||||||
writer.flush();
|
writer.flush();
|
||||||
}
|
}
|
||||||
locker.lock(key);
|
|
||||||
}
|
}
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
|
Loading…
Add table
Reference in a new issue