fix: fixed bugs for runtime application
This commit is contained in:
@@ -22,17 +22,7 @@ public class WebSocketMessageConsumer {
|
||||
public void onMessage(String json) {
|
||||
try {
|
||||
JSONObject msg = JSON.parseObject(json);
|
||||
|
||||
String to = msg.getString("to");
|
||||
|
||||
if (to == null || to.isEmpty()) {
|
||||
// 这是广播 / 系统消息
|
||||
sessionManager.broadcast(json);
|
||||
} else {
|
||||
// 单发消息
|
||||
// sessionManager.sendToUser(Integer.valueOf(to), json);
|
||||
commandDispatcher.dispatch(msg);
|
||||
}
|
||||
commandDispatcher.dispatch(msg);
|
||||
|
||||
} catch (Exception e) {
|
||||
log.info(e.getMessage());
|
||||
|
||||
Reference in New Issue
Block a user