aboutsummaryrefslogtreecommitdiff
path: root/haminer.go
diff options
context:
space:
mode:
Diffstat (limited to 'haminer.go')
-rw-r--r--haminer.go15
1 files changed, 0 insertions, 15 deletions
diff --git a/haminer.go b/haminer.go
index 45c15c7..256a068 100644
--- a/haminer.go
+++ b/haminer.go
@@ -8,9 +8,6 @@ import (
"fmt"
"log"
"net"
- "os"
- "os/signal"
- "syscall"
"time"
)
@@ -18,7 +15,6 @@ import (
type Haminer struct {
cfg *Config
udpConn *net.UDPConn
- chSignal chan os.Signal
chHttpLog chan *HttpLog
ff []Forwarder
isRunning bool
@@ -33,14 +29,10 @@ func NewHaminer(cfg *Config) (h *Haminer) {
h = &Haminer{
cfg: cfg,
- chSignal: make(chan os.Signal, 1),
chHttpLog: make(chan *HttpLog, 30),
ff: make([]Forwarder, 0),
}
- signal.Notify(h.chSignal, syscall.SIGHUP, syscall.SIGINT,
- syscall.SIGTERM, syscall.SIGQUIT)
-
h.createForwarder()
return
@@ -75,11 +67,6 @@ func (h *Haminer) Start() (err error) {
go h.consume()
go h.produce()
-
- <-h.chSignal
-
- h.Stop()
-
return
}
@@ -171,8 +158,6 @@ func (h *Haminer) produce() {
func (h *Haminer) Stop() {
h.isRunning = false
- signal.Stop(h.chSignal)
-
if h.udpConn != nil {
err := h.udpConn.Close()
if err != nil {