le 1.5 → 1.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/LE.gemspec +1 -1
  2. data/lib/le/host/https/tcp.rb +10 -1
  3. metadata +4 -4
data/LE.gemspec CHANGED
@@ -3,7 +3,7 @@ require File.expand_path(File.join(dir, 'lib', 'le'))
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "le"
6
- s.version = "1.5"
6
+ s.version = "1.6"
7
7
  s.date = Time.now
8
8
  s.summary = "Logentries plugin"
9
9
  s.description =<<EOD
@@ -46,11 +46,20 @@ module Le
46
46
 
47
47
  def deliver(message)
48
48
 
49
+ if @conn == nil
50
+ begin
51
+ createSocket(@key, @location)
52
+ rescue OpenSSL::SSL::SSLError, TimeoutError, Errno::EHOSTUNREACH, Errno::ECONNREFUSED, Errno::ECONNRESET, Errno::ETIMEDOUT, EOFError => e
53
+ $stderr.puts "WARNING: #{e.class} Could not write log. No connection to Logentries #{e.message}"
54
+ return
55
+ end
56
+ end
49
57
  # Sends the log to the Logentries Server
50
58
  begin
51
59
  @conn.print(message + "\r\n")
52
60
  rescue OpenSSL::SSL::SSLError, TimeoutError, Errno::EHOSTUNREACH, Errno::ECONNREFUSED, Errno::ENOTCONN, Errno::ECONNRESET, Errno::ETIMEDOUT, EOFError => e
53
- $stderr.puts "WARNING: #{e.class} sending log #{e.message}"
61
+
62
+ $stderr.puts "WARNING: #{e.class} sending log #{e.message}"
54
63
  begin
55
64
  createSocket(@key, @location)
56
65
  rescue OpenSSL::SSL::SSLError, TimeoutError, Errno::EHOSTUNREACH, Errno::ECONNREFUSED, Errno::ECONNRESET, Errno::ETIMEDOUT, EOFError => e
metadata CHANGED
@@ -1,12 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: le
3
3
  version: !ruby/object:Gem::Version
4
- hash: 5
4
+ hash: 3
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
- - 5
9
- version: "1.5"
8
+ - 6
9
+ version: "1.6"
10
10
  platform: ruby
11
11
  authors:
12
12
  - Mark Lacomber (Logentries)
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-08-08 00:00:00 Z
17
+ date: 2011-08-09 00:00:00 Z
18
18
  dependencies: []
19
19
 
20
20
  description: |