Skip to content

Commit

Permalink
remove reuseport in ghttp
Browse files Browse the repository at this point in the history
  • Loading branch information
gqcn committed Feb 14, 2019
1 parent 6f02ad6 commit c00f528
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

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

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
3 changes: 1 addition & 2 deletions g/net/ghttp/ghttp_server_graceful.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
"crypto/tls"
"errors"
"fmt"
"github.com/gogf/gf/g/net/greuseport"
"github.com/gogf/gf/g/os/glog"
"github.com/gogf/gf/g/os/gproc"
"net"
Expand Down Expand Up @@ -146,7 +145,7 @@ func (s *gracefulServer) getNetListener(addr string) (net.Listener, error) {
} else {
// 如果监听失败,1秒后重试,最多重试3次
for i := 0; i < 3; i++ {
ln, err = greuseport.Listen("tcp", addr)
ln, err = net.Listen("tcp", addr)
if err != nil {
err = fmt.Errorf("%d: net.Listen error: %v", gproc.Pid(), err)
time.Sleep(time.Second)
Expand Down

0 comments on commit c00f528

Please sign in to comment.