lib/logstash/outputs/websocket.rb in logstash-lite-0.2.20101201111523 vs lib/logstash/outputs/websocket.rb in logstash-lite-0.2.20101207114354
- old
+ new
@@ -7,13 +7,13 @@
end
def register
@channel = EventMachine::Channel.new
@subscribers = 0
- host = (@url.host or "0.0.0.0")
- port = (@url.port or 3000)
+ @url.host = (@url.host or "0.0.0.0")
+ @url.port = (@url.port or 3232)
@logger.info("Registering websocket on #{@url}")
- EventMachine::WebSocket.start(:host => host, :port => port) do |ws|
+ EventMachine::WebSocket.start(:host => @url.host, :port => @url.port) do |ws|
ws.onopen do
@subscribers += 1
@logger.info("New #{self.class.name} connection")
sid = @channel.subscribe do |msg|
ws.send msg