logstash-input-tcp 6.0.1-java → 6.0.2-java

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b302df6e39b800aa93dc56ddeff90534f404c8e322a7d6ac5f359123e964dc3a
4
- data.tar.gz: 77db42b004f85076fc336424b8fe30c10ac107c6e4a90ce68e7ffee63159651b
3
+ metadata.gz: f82b021e38562b73fd86db67622bf4e701c318877db99e2975c439bbbfcbc9f0
4
+ data.tar.gz: 45be9692924611030546fc05ef18046ffca0e4430fb6b5647cf5255948f89895
5
5
  SHA512:
6
- metadata.gz: e531556d356c2037e23168faf0848b05ea4a7760e60a04be9a045a69d0cce07b5edb0ea7a84314bd47cad55f050bee5ffcf8e6d186c12796efce1db9cf86e112
7
- data.tar.gz: 91b06eee36084aa9de3e7bfd71920d6e0c77085d26e2cc51df7abeec208f540e17c08c06a220b20efe0d6f7b4eaeed4426aee192f1c9d62ebad7d8d61deb00b0
6
+ metadata.gz: c2a1aac5ed786a53c841e440f9aab3d2132e1979284302d30bc1b16c206eb3716a940709e189d9b9fd276dcf6bda4661f4969822f1a5a8c089447819070dd46f
7
+ data.tar.gz: e3ffa0f369214f727bc3dc2202e5d8ff1eaf379a6c8aff2df0a652a616dae723c483a4042294a52d2c8f80412a1c62101ba3049dfcdde01fc54448d8809e7c1f
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 6.0.2
2
+ - Fixed race condition where data would be accepted before queue was configured
3
+
1
4
  ## 6.0.1
2
5
  - Support multiple certificates per file [#140](https://github.com/logstash-plugins/logstash-input-tcp/pull/140)
3
6
 
@@ -137,11 +137,6 @@ class LogStash::Inputs::Tcp < LogStash::Inputs::Base
137
137
  def register
138
138
  fix_streaming_codecs
139
139
 
140
- # note that since we are opening a socket in register, we must also make sure we close it
141
- # in the close method even if we also close it in the stop method since we could have
142
- # a situation where register is called but not run & stop.
143
-
144
- @logger.info("Starting tcp input listener", :address => "#{@host}:#{@port}", :ssl_enable => "#{@ssl_enable}")
145
140
  if server?
146
141
  ssl_context = get_ssl_context(SslOptions)
147
142
 
@@ -153,6 +148,7 @@ class LogStash::Inputs::Tcp < LogStash::Inputs::Base
153
148
  def run(output_queue)
154
149
  @output_queue = output_queue
155
150
  if server?
151
+ @logger.info("Starting tcp input listener", :address => "#{@host}:#{@port}", :ssl_enable => "#{@ssl_enable}")
156
152
  @loop.run
157
153
  else
158
154
  run_client()
@@ -399,12 +399,7 @@ describe LogStash::Inputs::Tcp do
399
399
  chain_of_certificates = TcpHelpers.new.chain_of_certificates
400
400
 
401
401
  let(:tcp) do
402
- begin
403
- socket = TCPSocket.new("127.0.0.1", port)
404
- rescue Errno::ECONNREFUSED
405
- sleep 1
406
- socket = TCPSocket.new("127.0.0.1", port)
407
- end
402
+ Stud::try(5.times) { TCPSocket.new("127.0.0.1", port) }
408
403
  end
409
404
  let(:sslcontext) do
410
405
  sslcontext = OpenSSL::SSL::SSLContext.new
@@ -502,14 +497,8 @@ describe LogStash::Inputs::Tcp do
502
497
 
503
498
  context "that disconnects before doing TLS handshake" do
504
499
  before do
505
- begin
506
- client = TCPSocket.new("127.0.0.1", port)
507
- client.close
508
- rescue Errno::ECONNREFUSED
509
- sleep 1
510
- client = TCPSocket.new("127.0.0.1", port)
511
- client.close
512
- end
500
+ client = Stud::try(5.times) { TCPSocket.new("127.0.0.1", port) }
501
+ client.close
513
502
  end
514
503
 
515
504
  it "should not negatively impact the plugin" do
@@ -540,7 +529,7 @@ describe LogStash::Inputs::Tcp do
540
529
  # Assertion to verify this test is actually sending something.
541
530
  expect(garbage.length).to be > 0
542
531
 
543
- client = TCPSocket.new("127.0.0.1", port)
532
+ client = Stud::try(5.times) { TCPSocket.new("127.0.0.1", port) }
544
533
  client.write(garbage)
545
534
  client.flush
546
535
  Thread.new { sleep(1); client.close }
data/version CHANGED
@@ -1 +1 @@
1
- 6.0.1
1
+ 6.0.2
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-input-tcp
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.1
4
+ version: 6.0.2
5
5
  platform: java
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-08 00:00:00.000000000 Z
11
+ date: 2019-03-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -164,7 +164,7 @@ files:
164
164
  - logstash-input-tcp.gemspec
165
165
  - spec/inputs/tcp_spec.rb
166
166
  - spec/spec_helper.rb
167
- - vendor/jar-dependencies/org/logstash/inputs/logstash-input-tcp/6.0.1/logstash-input-tcp-6.0.1.jar
167
+ - vendor/jar-dependencies/org/logstash/inputs/logstash-input-tcp/6.0.2/logstash-input-tcp-6.0.2.jar
168
168
  - version
169
169
  homepage: http://www.elastic.co/guide/en/logstash/current/index.html
170
170
  licenses: