remailer 0.4.4 → 0.4.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.4
1
+ 0.4.5
@@ -238,6 +238,7 @@ class Remailer::Connection < EventMachine::Connection
238
238
  # This implements the EventMachine::Connection#unbind method to capture
239
239
  # a connection closed event.
240
240
  def unbind
241
+ @connected = false
241
242
  @interpreter = nil
242
243
 
243
244
  if (@active_message)
@@ -245,7 +246,7 @@ class Remailer::Connection < EventMachine::Connection
245
246
  callback.call(nil)
246
247
  end
247
248
  end
248
-
249
+
249
250
  send_callback(:on_disconnect)
250
251
  end
251
252
 
@@ -315,8 +316,9 @@ class Remailer::Connection < EventMachine::Connection
315
316
  # Checks for a timeout condition, and if one is detected, will close the
316
317
  # connection and send appropriate callbacks.
317
318
  def check_for_timeouts!
318
- return if (!@timeout_at or Time.now < @timeout_at)
319
+ return if (!@timeout_at or Time.now < @timeout_at or @timed_out)
319
320
 
321
+ @timed_out = true
320
322
  @timeout_at = nil
321
323
 
322
324
  if (@connected and @active_message)
@@ -383,6 +385,8 @@ class Remailer::Connection < EventMachine::Connection
383
385
  send_callback(:on_disconnect)
384
386
  debug_notification(:closed, "Connection closed")
385
387
  super
388
+
389
+ @connected = false
386
390
  @closed = true
387
391
  @timeout_at = nil
388
392
  end
data/remailer.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{remailer}
8
- s.version = "0.4.4"
8
+ s.version = "0.4.5"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Scott Tadman"]
12
- s.date = %q{2011-03-03}
12
+ s.date = %q{2011-03-27}
13
13
  s.description = %q{EventMachine SMTP Mail User Agent}
14
14
  s.email = %q{scott@twg.ca}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: remailer
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.4.4
5
+ version: 0.4.5
6
6
  platform: ruby
7
7
  authors:
8
8
  - Scott Tadman
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-03-03 00:00:00 -05:00
13
+ date: 2011-03-27 00:00:00 -06:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency