Commit 5755b07e authored by Dave Syer's avatar Dave Syer Committed by Phillip Webb

Switch roles of snake and echo

Snake is stateful so it should be one per connection. Echo is the
opposite.
parent 347f30d1
......@@ -55,12 +55,12 @@ public class SampleWebSocketsApplication extends SpringBootServletInitializer {
@Bean(name = "/echo")
public WebSocketHandler echoWebSocketHandler() {
return new PerConnectionWebSocketHandler(EchoWebSocketHandler.class);
return new EchoWebSocketHandler(echoService());
}
@Bean(name = "/snake")
public WebSocketHandler snakeWebSocketHandler() {
return new SnakeWebSocketHandler();
return new PerConnectionWebSocketHandler(SnakeWebSocketHandler.class);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment