File tree Expand file tree Collapse file tree 4 files changed +5
-37
lines changed Expand file tree Collapse file tree 4 files changed +5
-37
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ import (
31
31
"github.com/antlabs/wsutil/bytespool"
32
32
"github.com/antlabs/wsutil/deflate"
33
33
"github.com/antlabs/wsutil/enum"
34
+ "github.com/antlabs/wsutil/myonce"
34
35
"golang.org/x/sys/unix"
35
36
)
36
37
@@ -79,8 +80,8 @@ type Conn struct {
79
80
// 也可以共用mu,区别 优点:节约内存,缺点:容易出现死锁和需要精心调试代码
80
81
// 这里选择维护简单
81
82
mu2 sync.Mutex
82
- onCloseOnce myOnce // 保证只调用一次OnClose函数
83
- closed int32 // 是否关闭
83
+ onCloseOnce myonce. MyOnce // 保证只调用一次OnClose函数
84
+ closed int32 // 是否关闭
84
85
}
85
86
86
87
func newConn (fd int64 , client bool , conf * Config ) * Conn {
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ module github.com/antlabs/greatws
3
3
go 1.21
4
4
5
5
require (
6
- github.com/antlabs/wsutil v0.1.9
6
+ github.com/antlabs/wsutil v0.1.10
7
7
golang.org/x/sys v0.12.0
8
8
)
9
9
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ func (s StatusCode) String() string {
67
67
return "ServerTerminating"
68
68
}
69
69
70
- return "unkown "
70
+ return "unknown "
71
71
}
72
72
73
73
type CloseErrMsg struct {
You can’t perform that action at this time.
0 commit comments