Commit 750e393
Fix race condition in tcp output server mode
A race condition in tcp output could cause the shipper to die with an
exception because the thread's [:client] property would not yet be
initialised when the main program would start to put data into it:
NoMethodError: undefined method `write' for nil:NilClass
register at lib/logstash/outputs/tcp.rb:143
each at org/jruby/RubyArray.java:1613
register at lib/logstash/outputs/tcp.rb:142
call at org/jruby/RubyProc.java:271
encode at lib/logstash/codecs/json_lines.rb:50
receive at lib/logstash/outputs/tcp.rb:208
handle at lib/logstash/outputs/base.rb:86
initialize at (eval):47
call at org/jruby/RubyProc.java:271
output at lib/logstash/pipeline.rb:266
outputworker at lib/logstash/pipeline.rb:225
start_outputs at lib/logstash/pipeline.rb:1521 parent 3f955ad commit 750e393
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
| 73 | + | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
76 | 77 | | |
77 | 78 | | |
78 | | - | |
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| |||
0 commit comments