...
This commit is contained in:
parent
5eb0184bd4
commit
ee1d2550d3
|
@ -76,10 +76,10 @@ public class WebSocketServer {
|
||||||
* @param message 消息内容
|
* @param message 消息内容
|
||||||
*/
|
*/
|
||||||
public void sendMessage(Long userId, MessageData<?> message) {
|
public void sendMessage(Long userId, MessageData<?> message) {
|
||||||
servers.values().forEach(info -> {
|
servers.values().stream()
|
||||||
if (userId.equals(info.getUserId())) {
|
.filter(index -> userId.equals(index.getUserId()))
|
||||||
sendMessage(info.getSession(), message);
|
.forEach(index -> {
|
||||||
}
|
sendMessage(index.getSession(), message);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue