Skip to content

Commit c00f528

Browse files
committed
remove reuseport in ghttp
1 parent 6f02ad6 commit c00f528

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2017 john@johng.cn http://johng.cn
3+
Copyright (c) 2017 john@goframe.org https://goframe.org
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

g/net/ghttp/ghttp_server_graceful.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import (
1111
"crypto/tls"
1212
"errors"
1313
"fmt"
14-
"github.com/gogf/gf/g/net/greuseport"
1514
"github.com/gogf/gf/g/os/glog"
1615
"github.com/gogf/gf/g/os/gproc"
1716
"net"
@@ -146,7 +145,7 @@ func (s *gracefulServer) getNetListener(addr string) (net.Listener, error) {
146145
} else {
147146
// 如果监听失败,1秒后重试,最多重试3次
148147
for i := 0; i < 3; i++ {
149-
ln, err = greuseport.Listen("tcp", addr)
148+
ln, err = net.Listen("tcp", addr)
150149
if err != nil {
151150
err = fmt.Errorf("%d: net.Listen error: %v", gproc.Pid(), err)
152151
time.Sleep(time.Second)

0 commit comments

Comments
 (0)