einhorn 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -46,7 +46,11 @@ module Einhorn::Event
46
46
  chunk = @socket.read_nonblock(1024)
47
47
  rescue Errno::EAGAIN
48
48
  break
49
- rescue EOFError, Errno::EPIPE
49
+ rescue EOFError, Errno::EPIPE, Errno::ECONNRESET
50
+ close
51
+ break
52
+ rescue StandardError => e
53
+ log_error("Caught unrecognized error while reading from socket: #{e} (#{e.class})")
50
54
  close
51
55
  break
52
56
  else
@@ -72,7 +76,10 @@ module Einhorn::Event
72
76
  return if @closed
73
77
  written = @socket.write_nonblock(@write_buffer)
74
78
  rescue Errno::EWOULDBLOCK, Errno::EAGAIN, Errno::EINTR
75
- rescue Errno::EPIPE
79
+ rescue Errno::EPIPE, Errno::ECONNRESET
80
+ close
81
+ rescue StandardError => e
82
+ log_error("Caught unrecognized error while writing to socket: #{e} (#{e.class})")
76
83
  close
77
84
  else
78
85
  log_debug("wrote #{written} bytes")
@@ -1,3 +1,3 @@
1
1
  module Einhorn
2
- VERSION = '0.3.0'
2
+ VERSION = '0.3.1'
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: einhorn
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 17
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 0
10
- version: 0.3.0
9
+ - 1
10
+ version: 0.3.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Greg Brockman