spray-websocket icon indicating copy to clipboard operation
spray-websocket copied to clipboard

spray-websocket doesn't use the actual ActorSystem configuration but loads "application.conf" regardless of it

Open pangiole opened this issue 10 years ago • 0 comments

Please, consider the following scenario:

  • users could decide to create their ActorSystem passing a Config object different than the application.conf simply because Akka allows it:
implicit val system = ActorSystem("mySystem", ConfigFactory.load("mySystem.conf"))
  • spray-websocket package object is actually loading the default application.conf file regardless the above decision and without considering the ActorySystem could have been configured with a different Config object
package object websocket {

  val config = ConfigFactory.load().getConfig("spray.websocket")
  // ...
}
  • That will certainly lead to a misconfiguration making users notice unexpected behaviour of spray-websocket

pangiole avatar Aug 10 '15 09:08 pangiole