socket is now sequential and not concurrent
This commit is contained in:
parent
bcade19f52
commit
e776b9c2e5
1 changed files with 2 additions and 2 deletions
|
@ -58,9 +58,9 @@ public class SensorSocketEndpoint extends Endpoint {
|
||||||
* @return number of successful transfer
|
* @return number of successful transfer
|
||||||
*/
|
*/
|
||||||
public long broadcast(Object message, User u) {
|
public long broadcast(Object message, User u) {
|
||||||
final Collection<Session> sessions = authorizedClients.get(u);
|
final HashSet<Session> sessions = new HashSet<>(authorizedClients.get(u));
|
||||||
|
|
||||||
return sessions.stream()
|
return sessions.stream()
|
||||||
.parallel()
|
|
||||||
.filter(
|
.filter(
|
||||||
s -> {
|
s -> {
|
||||||
if (s.isOpen()) return true;
|
if (s.isOpen()) return true;
|
||||||
|
|
Loading…
Reference in a new issue