logstash-input-tcp 5.2.1-java → 5.2.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: 6ee7c79fca2dceea8688b100903ab8318ad2cd652740b0538c102504209bd1e0
4
- data.tar.gz: fee6f5e7d1804c8ef60fd771a3d50caeeee289c9e517a93c2a33a5d207202bdb
3
+ metadata.gz: 147048d4bbe35f7c640da0c8cf9b54dc54bf15ebc3fe9141615c2168dbc0ab31
4
+ data.tar.gz: 53271ca6cf4aa13ae1621040c256aa0e78bb4455464e07073aece8212ab27f77
5
5
  SHA512:
6
- metadata.gz: 970218c4f6ed173209de6d40113423a49e356e1eeb3a8cf8603b5ddd7c51ae4766cadf73e78d917a17ba36b4d447fc1d9512ea12081dbd1cbb2e28e0f8ea9340
7
- data.tar.gz: 0b4120780dcae5f582c118247a064025a57f998ddbe20ff5cb15d3c4ecbdef0a0a522cd6bd2968e77db75ff034d6810f4e13f8372f2de49ce08ea1cada19e573
6
+ metadata.gz: f391dcd37cc06060b0fe0ee7d2525b164f5036a3c959d8c8df9b05e294587ef396314206ca782b115708deebe4a398aa0dc57a4018240d6a7f95b887911665f3
7
+ data.tar.gz: 91d4f5a4861601a181a07e029ee9caea9f07c5dd8028e7128a6c9e8a8c0a7c9c0d7a76ac4f930176919c46f0f3e125049af6e82aaa190064284b455ec8270c7f
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 5.2.2
2
+ - Fixed race condition where data would be accepted before queue was configured [#142](https://github.com/logstash-plugins/logstash-input-tcp/pull/142)
3
+
1
4
  ## 5.2.1
2
5
  - Support multiple certificates per file [#140](https://github.com/logstash-plugins/logstash-input-tcp/pull/140)
3
6
  - Fixed support for encrypted pkcs8 private keys [#133](https://github.com/logstash-plugins/logstash-input-tcp/pull/133)
@@ -141,11 +141,6 @@ class LogStash::Inputs::Tcp < LogStash::Inputs::Base
141
141
  def register
142
142
  fix_streaming_codecs
143
143
 
144
- # note that since we are opening a socket in register, we must also make sure we close it
145
- # in the close method even if we also close it in the stop method since we could have
146
- # a situation where register is called but not run & stop.
147
-
148
- @logger.info("Starting tcp input listener", :address => "#{@host}:#{@port}", :ssl_enable => "#{@ssl_enable}")
149
144
  if server?
150
145
  ssl_context = get_ssl_context(SslOptions)
151
146
 
@@ -157,6 +152,7 @@ class LogStash::Inputs::Tcp < LogStash::Inputs::Base
157
152
  def run(output_queue)
158
153
  @output_queue = output_queue
159
154
  if server?
155
+ @logger.info("Starting tcp input listener", :address => "#{@host}:#{@port}", :ssl_enable => "#{@ssl_enable}")
160
156
  @loop.run
161
157
  else
162
158
  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
- 5.2.1
1
+ 5.2.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: 5.2.1
4
+ version: 5.2.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/5.2.1/logstash-input-tcp-5.2.1.jar
167
+ - vendor/jar-dependencies/org/logstash/inputs/logstash-input-tcp/5.2.2/logstash-input-tcp-5.2.2.jar
168
168
  - version
169
169
  homepage: http://www.elastic.co/guide/en/logstash/current/index.html
170
170
  licenses: