mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 06:37:19 -04:00
- document a monkeypatch
This commit is contained in:
parent
7ad980dd0a
commit
d006c907d3
1 changed files with 2 additions and 0 deletions
|
@ -92,6 +92,8 @@ class LogStash::Inputs::Tcp < LogStash::Inputs::Base
|
|||
# Start a new thread for each connection.
|
||||
Thread.start(@server_socket.accept) do |s|
|
||||
# TODO(sissel): put this block in its own method.
|
||||
|
||||
# monkeypatch a 'peer' method onto the socket.
|
||||
s.instance_eval { class << self; include SocketPeer end }
|
||||
@logger.debug("Accepted connection from #{s.peer} on #{@host}:#{@port}")
|
||||
handle_socket(s, output_queue, "tcp://#{@host}:#{@port}/client/#{s.peer}")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue