Skip to content
This repository has been archived by the owner on Oct 8, 2022. It is now read-only.

Ignore message from unknown peerID #214

Closed
tdurieux opened this issue Apr 22, 2015 · 0 comments
Closed

Ignore message from unknown peerID #214

tdurieux opened this issue Apr 22, 2015 · 0 comments
Assignees
Milestone

Comments

@tdurieux
Copy link
Member

When a user sends a synchronization request with a unknown peerID, the synchronization crashes and all other connected users receive a raw synchronization request.

Server exception:

java.util.NoSuchElementException: key not found: vn85oh3y
        at scala.collection.MapLike$class.default(MapLike.scala:228)
        at scala.collection.AbstractMap.default(Map.scala:58)
        at scala.collection.MapLike$class.apply(MapLike.scala:141)
        at scala.collection.AbstractMap.apply(Map.scala:58)
        at gnieh.blue.sync.impl.SyncActor.processMessage(SyncActor.scala:279)
        at gnieh.blue.sync.impl.SyncActor$$anonfun$receiving$1$$anonfun$3.doCommands$1(SyncActor.scala:120)
        at gnieh.blue.sync.impl.SyncActor$$anonfun$receiving$1$$anonfun$3.apply(SyncActor.scala:130)
        at gnieh.blue.sync.impl.SyncActor$$anonfun$receiving$1$$anonfun$3.apply(SyncActor.scala:111)
        at scala.util.Try$.apply(Try.scala:161)
        at gnieh.blue.sync.impl.SyncActor$$anonfun$receiving$1.applyOrElse(SyncActor.scala:111)
        at akka.actor.Actor$class.aroundReceive(Actor.scala:465)
        at gnieh.blue.sync.impl.SyncActor.aroundReceive(SyncActor.scala:74)
        at akka.actor.ActorCell.receiveMessage(ActorCell.scala:516)
        at akka.actor.ActorCell.invoke(ActorCell.scala:487)
        at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:238)
        at akka.dispatch.Mailbox.run(Mailbox.scala:220)
        at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:393)
        at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
        at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
        at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
        at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
@satabin satabin self-assigned this Apr 22, 2015
@satabin satabin added this to the v1.1.0 milestone Apr 22, 2015
satabin added a commit that referenced this issue Apr 27, 2015
[fix #214] Ignore messages from unknown peers
@satabin satabin modified the milestones: v1.1.0, v1.0.6 Apr 27, 2015
satabin added a commit that referenced this issue Apr 27, 2015
If a peer sends a message to broadcast but is still unknown to the
server, his message is simply ignored.
Before the first synchronization, a peer cannot send his position but
I'd say it is safer this way anyway and is not much of a problem.

In any way, the server should not throw any exception in this case.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants