Skip to content

Commit

Permalink
fix strange bug with wire[netty.NettyServer] in production
Browse files Browse the repository at this point in the history
```sh
sbt stage
./target/universal/stage/bin/lila-ws -Dconfig.file=/home/thib/lila-ws/src/main/resources/application.conf
```

```
Exception in thread "main" java.lang.NoSuchMethodError: 'void lila.ws.netty.NettyServer.<init>(org.apache.pekko.actor.typed.ActorSystem, lila.ws.Router, com.typesafe.config.Config, scala.concurrent.ExecutionContext, org.apache.pekko.actor.typed.Scheduler)'
        at lila.ws.LilaWs$.nettyServer$lzyINIT1(LilaWs.scala:36)
        at lila.ws.LilaWs$.nettyServer(LilaWs.scala:36)
        at lila.ws.LilaWs$.<clinit>(LilaWs.scala:41)
        at lila.ws.LilaWs.main(LilaWs.scala)
```
  • Loading branch information
ornicar committed Oct 7, 2024
1 parent eb88b49 commit 5802376
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/scala/LilaWs.scala
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ object LilaWs extends App:
lazy val router = wire[Router]
lazy val seenAt = wire[SeenAtUpdate]
lazy val auth = wire[Auth]
lazy val nettyServer = wire[netty.NettyServer]
lazy val monitor = wire[Monitor]
// `wire[netty.NettyServer]` fails in production!
lazy val nettyServer = netty.NettyServer(clientSystem, router, config, settings)
lazy val monitor = wire[Monitor]

wire[LilaHandler] // must eagerly instanciate!
wire[RelayCrowd] // must eagerly instanciate!
Expand Down

0 comments on commit 5802376

Please sign in to comment.