haredo 2.0.3 → 2.0.4

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
  SHA1:
3
- metadata.gz: 43533e962c0f024fdb12f16ff9ca5258b7c1353b
4
- data.tar.gz: 804600d16e7b520588650eb08abb618dd101e240
3
+ metadata.gz: adcb099319bb52f459a005ddd10a86995fef2093
4
+ data.tar.gz: 848ea0c89540ff8298f035bfcb9cd228a42c3fde
5
5
  SHA512:
6
- metadata.gz: 19003bf2edb73e5ae6073ea03fa0f83e4b538cb029c87a56768828ec483ce9046245a96a01f883465181abeca078b539b744bc4c70fe7d7bef5dd96aa2055bd8
7
- data.tar.gz: 2ca32ed74035e4ede55c035207bc544e1628f2ffa2e1df219645e7f8e7519f9627bb5f0641f2b9683a30b410f0c95cdc96867f217741ac114c2a77c2f91df1db
6
+ metadata.gz: 19d58fc3a38f411b09b1d2c91f4678fc8b3cf6401ed0e6f16d0985891686cfc41e4f29daf9cee796ec791c6be19d637a273040f35efb80e3d73862ae3eb016ef
7
+ data.tar.gz: 2aeaf95425000d2a19fe15f5881e6b5cb2e6e26a7844104ea9f3e577e0c242d330e22d382feacfef3cace2ec1417b21c9f85c06e84d5e553e77474fc553cc077
data/src/bin/haredo CHANGED
@@ -22,13 +22,39 @@ class CommandLine
22
22
  @commands[interface.name] = interface
23
23
  end
24
24
 
25
- def daemonize()
26
-
27
- daemon = HareDo::Service::Daemon::new(@service)
28
- daemon.run()
25
+ # Guard against Bunny connection errors.
26
+ # @return Returns false if connection error occurs, true for normal shutdown.
27
+ def runforever()
28
+ while true
29
+ begin
30
+ daemon = HareDo::Service::Daemon::new(@service)
31
+ daemon.run()
32
+ rescue
33
+ begin
34
+ daemon.shutdown()
35
+ daemon = nil
36
+ return false
37
+ rescue
38
+ # Ignore
39
+ end
40
+ end
41
+ end
29
42
 
43
+ # Normal shutdown
30
44
  daemon.shutdown()
31
45
 
46
+ return true
47
+ end
48
+
49
+ def daemonize()
50
+ while runforever() == false
51
+ begin
52
+ puts 'Reconnecting'
53
+ sleep 5
54
+ rescue
55
+ # Ignore
56
+ end
57
+ end
32
58
  puts 'Daemon exiting'
33
59
  end
34
60
 
@@ -113,8 +113,8 @@ class Daemon < HareDo::Peer
113
113
  file = File.open(@pid_file, 'w')
114
114
  file.write(Process.pid.to_s)
115
115
  file.close()
116
-
117
- listen(args)
116
+
117
+ listen(args)
118
118
  end
119
119
 
120
120
  def serve(msg)
@@ -4,8 +4,8 @@ module HareDo
4
4
  VERSION_MAJ = '2'
5
5
  VERSION_MIN = '0'
6
6
  VERSION_CL = ''
7
- VERSION_PL = '3'
8
- VERSION = '2.0.3-1'
9
- RELEASE_DATE = 'Tue, 08 Oct 2013 11:41:29 -0500'
7
+ VERSION_PL = '4'
8
+ VERSION = '2.0.4-1'
9
+ RELEASE_DATE = 'Tue, 08 Oct 2013 14:41:57 -0500'
10
10
 
11
11
  end # module HareDo
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: haredo
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.3
4
+ version: 2.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Owens