Actually maybe not, I just realised there is no way to intercept the creation of WebSocketChannel to wrap the ConnectedStreamChannel with an IdleTimeoutStreamChannel.