aboutsummaryrefslogtreecommitdiffstats
path: root/syz-hub
diff options
context:
space:
mode:
Diffstat (limited to 'syz-hub')
-rw-r--r--syz-hub/hub.go11
1 files changed, 10 insertions, 1 deletions
diff --git a/syz-hub/hub.go b/syz-hub/hub.go
index 037f01d47..a203149c5 100644
--- a/syz-hub/hub.go
+++ b/syz-hub/hub.go
@@ -65,7 +65,16 @@ func main() {
Logf(0, "serving rpc on tcp://%v", ln.Addr())
s := rpc.NewServer()
s.Register(hub)
- s.Accept(ln)
+ for {
+ conn, err := ln.Accept()
+ if err != nil {
+ Logf(0, "failed to accept an rpc connection: %v", err)
+ continue
+ }
+ conn.SetKeepAlive(true)
+ conn.SetKeepAlivePeriod(time.Minute)
+ go s.ServeConn(conn)
+ }
}
func (hub *Hub) Connect(a *HubConnectArgs, r *int) error {