summaryrefslogtreecommitdiff
path: root/src/hub/src/spreadspace.org/sfive/s5srv.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/hub/src/spreadspace.org/sfive/s5srv.go')
-rw-r--r--src/hub/src/spreadspace.org/sfive/s5srv.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/hub/src/spreadspace.org/sfive/s5srv.go b/src/hub/src/spreadspace.org/sfive/s5srv.go
index e8778df..6742b6f 100644
--- a/src/hub/src/spreadspace.org/sfive/s5srv.go
+++ b/src/hub/src/spreadspace.org/sfive/s5srv.go
@@ -56,8 +56,9 @@ type Server struct {
wgWorker *sync.WaitGroup
ingestChan chan ingestToken
interfaces struct {
- web *http.Server
+ pipe net.Listener
pipegram net.PacketConn
+ web *http.Server
}
}
@@ -137,11 +138,11 @@ func (srv *Server) shutdownInterfaces() (errors int) {
ctx, cancel := context.WithTimeout(context.Background(), 90*time.Second)
c := make(chan error)
go func() { c <- srv.webStop(ctx) }()
- //go func() { c <- srv.pipeStop(ctx) }() // TODO: add this as soon as pipe interface can be stopped
+ go func() { c <- srv.pipeStop(ctx) }()
go func() { c <- srv.pipegramStop(ctx) }()
errors = 0
- for i := 0; i < 2; i++ { // TODO: set limit to 3 when the above has been enabled
+ for i := 0; i < 3; i++ {
if err := <-c; err != nil {
s5l.Printf("srv: interface shutdown failed failed: %v", err)
errors++