quartz 1.2.0 → 1.3.0

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.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/go/quartz/quartz.go +17 -7
  4. data/quartz.gemspec +2 -2
  5. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1a22ff297e6904e0f037039526312cfcb4d2e22018d08c50216ea834b75067de
4
- data.tar.gz: 48bfc68a088720318828cc2389c1373753da2d27b9f144101d00c377a8824178
3
+ metadata.gz: cee4bc1d9d1e28d5ff2118db75428b8aa471cd01f2c118dbca864d4aa0ad9adc
4
+ data.tar.gz: cf42bc34fe9b295cbe8ecf666f4c59fce05ea29c6731584ff2cbc49f7d42ba0b
5
5
  SHA512:
6
- metadata.gz: f9f0845a06d885e1706a07040937577765e3c4dfc0eb66ebfce73e5a79df5b4234de1c42c5077f95d0b1642323bd506ebcb4b2cf4494ebc356ce8384f678a37b
7
- data.tar.gz: e1f1371656edb1f49e478dc4c99155f42fba25e0bd4a8f523b5bafc29997d4c0a87ec6df670a14c3c87070a1921195bb0eb140fd51ba1b428d88f51a21aba7e5
6
+ metadata.gz: eb6de5857da8b8c9eb68cc93164ef81fedae314f308d0f5cb058c61eaeb95ef04c2c7cbf69e7576494607226f2a8d29ad69fbe2239635260a4aae3582b327661
7
+ data.tar.gz: b383c700e38ab98fca13994d7de57a19b9a58b646db049a5e4e74f158a9c1a53e251b9aa2f7f644180df4d05caa728a7435eeb6fc32c948ff65f77d0c2082b3c
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.2.0
1
+ 1.3.0
@@ -1,6 +1,7 @@
1
1
  package quartz
2
2
 
3
3
  import (
4
+ "fmt"
4
5
  "net"
5
6
  "net/rpc"
6
7
  "net/rpc/jsonrpc"
@@ -56,13 +57,11 @@ func (q *Quartz) Start() {
56
57
 
57
58
  // Destroy the socket file when the server is killed.
58
59
  sigc := make(chan os.Signal)
59
- signal.Notify(sigc, syscall.SIGTERM)
60
+ signal.Notify(sigc, syscall.SIGTERM, syscall.SIGQUIT, syscall.SIGINT)
60
61
  go func() {
61
62
  <-sigc
62
- err := listener.Close()
63
- if err != nil {
64
- panic(err)
65
- }
63
+ listener.Close()
64
+ os.Remove(socketPath)
66
65
  os.Exit(0)
67
66
  }()
68
67
 
@@ -74,8 +73,19 @@ func (q *Quartz) Start() {
74
73
  if strings.Contains(err.Error(), "use of closed network connection") {
75
74
  return
76
75
  }
77
- panic(err)
76
+
77
+ fmt.Fprintf(os.Stderr, "error accepting connection: %s", err)
78
+ continue
78
79
  }
79
- go jsonrpc.ServeConn(conn)
80
+
81
+ go func() {
82
+ defer func() {
83
+ if r := recover(); r != nil {
84
+ fmt.Fprintf(os.Stderr, "Recovered from panic: %s", r)
85
+ }
86
+ }()
87
+
88
+ jsonrpc.ServeConn(conn)
89
+ }()
80
90
  }
81
91
  }
@@ -2,11 +2,11 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: quartz 1.2.0 ruby lib
5
+ # stub: quartz 1.3.0 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "quartz".freeze
9
- s.version = "1.2.0"
9
+ s.version = "1.3.0"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib".freeze]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: quartz
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Huie