title: scala.runtime.NonLocalReturnControl$mcV$sp thrown on return
body: <p>This exception gets thrown on line 36 of packet.scala (return statement), this lambda gets called by Side.handlePacket at line 53.</p>
  
  <p>Full log:</p>
  
  <pre><code> [INFO|2017-02-07 19:43:25|main] Intermediary starting up…
   [INFO|2017-02-07 19:43:25|Dispatcher Thread] Listening on port 31102
   [INFO|2017-02-07 19:43:25|main] Registered packet deserializer for packet 00 for side Server
   [INFO|2017-02-07 19:43:25|main] Registered packet class common.net.packet.PacketTest for side Server
   [INFO|2017-02-07 19:43:28|Dispatcher Thread] Queued connection /127.0.0.1:57026
   [INFO|2017-02-07 19:43:28|Connection Thread 0] New connection: /127.0.0.1:57026
   [DEBUG|2017-02-07 19:43:28|Connection Thread 0] New packet handler for class class common.net.packet.PacketTest!
   [DEBUG|2017-02-07 19:43:28|Connection Thread 0] New packet of size 5
   [INFO|2017-02-07 19:43:28|Connection Thread 0] Connection from /127.0.0.1:57026 closed
  Exception in thread "Connection Thread 0" scala.runtime.NonLocalReturnControl$mcV$sp
  </code></pre>
  
  <p>I'm only learning scala so I really don't know how to solve this. I'm not aware of catching any exceptions (the try statement in Intermediary.scala is only there for my "connection closed" message to be printed and it doesn't affect the error at all)</p>
  
  <p>I could probably catch the NonLocalReturnControl since it looks like that contains the object but there must be some other way to do this, right?</p>
  
  <p>Entry point is at Intermediary.start</p>
  
  <p><a href="https://gist.github.com/2xsaiko/0165bd3ca993f8a9ef2c2bb01c948fce" rel="nofollow noreferrer">packet.scala</a><br>
  <a href="https://gist.github.com/2xsaiko/0c02cdce3cfb669c641233ebc537f723" rel="nofollow noreferrer">Intermediary.scala</a></p>