File tree 4 files changed +10
-8
lines changed
4 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -38,9 +38,7 @@ func (d *Default) SetWriteDeadline(timeout time.Duration) error {
38
38
}
39
39
40
40
func (d * Default ) SetReadLimit (limit int64 ) {
41
- if ! d .isSetConf {
42
- d .conn .SetReadLimit (limit )
43
- }
41
+ d .conn .SetReadLimit (limit )
44
42
45
43
}
46
44
@@ -49,10 +47,7 @@ func (d *Default) SetPingHandler(handler PingPongHandler) {
49
47
}
50
48
51
49
func (d * Default ) SetPongHandler (handler PingPongHandler ) {
52
- if ! d .isSetConf {
53
- d .conn .SetPongHandler (handler )
54
- d .isSetConf = true
55
- }
50
+ d .conn .SetPongHandler (handler )
56
51
}
57
52
58
53
func (d * Default ) LocalAddr () string {
Original file line number Diff line number Diff line change @@ -71,6 +71,9 @@ func (w *JSWebSocket) Close() error {
71
71
}
72
72
73
73
func (w * JSWebSocket ) WriteMessage (messageType int , message []byte ) error {
74
+ if messageType == PingMessage || messageType == PongMessage {
75
+ return nil
76
+ }
74
77
return w .conn .Write (context .Background (), websocket .MessageType (messageType ), message )
75
78
}
76
79
Original file line number Diff line number Diff line change @@ -30,6 +30,10 @@ import (
30
30
"github.com/openimsdk/tools/mcontext"
31
31
)
32
32
33
+ func GetSdkVersion () string {
34
+ return version .Version
35
+ }
36
+
33
37
const (
34
38
rotateCount uint = 0
35
39
rotationTime uint = 24
Original file line number Diff line number Diff line change 29
29
ErrResourceLoad = errs .NewCodeError (ResourceLoadNotCompleteError , "ResourceLoadNotCompleteError" )
30
30
31
31
//消息相关
32
- ErrFileNotFound = errs .NewCodeError (FileNotFoundError , "RecordNotFoundError " )
32
+ ErrFileNotFound = errs .NewCodeError (FileNotFoundError , "FileNotFoundError " )
33
33
ErrMsgDecodeBinaryWs = errs .NewCodeError (MsgDecodeBinaryWsError , "MsgDecodeBinaryWsError" )
34
34
ErrMsgDeCompression = errs .NewCodeError (MsgDeCompressionError , "MsgDeCompressionError" )
35
35
ErrMsgBinaryTypeNotSupport = errs .NewCodeError (MsgBinaryTypeNotSupportError , "MsgTypeNotSupportError" )
You can’t perform that action at this time.
0 commit comments