Skip to content

Commit 3d7a81a

Browse files
authored
Merge pull request #12 from Lichmaker/hotfix/20250211-server
iec104 server handler bug fixed
2 parents b37b6c3 + 1436d08 commit 3d7a81a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

server/core.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
package server
22

33
import (
4+
"strconv"
5+
46
"github.com/wendy512/go-iecp5/asdu"
57
"github.com/wendy512/go-iecp5/clog"
68
"github.com/wendy512/go-iecp5/cs104"
7-
"strconv"
89
)
910

1011
// Settings 连接配置
@@ -64,10 +65,10 @@ func (s *Server) Stop() {
6465

6566
// SetOnConnectionHandler set on connect handler
6667
func (s *Server) SetOnConnectionHandler(f func(asdu.Connect)) {
67-
s.SetOnConnectionHandler(f)
68+
s.cs104Server.SetOnConnectionHandler(f)
6869
}
6970

7071
// SetConnectionLostHandler set connect lost handler
7172
func (s *Server) SetConnectionLostHandler(f func(asdu.Connect)) {
72-
s.SetConnectionLostHandler(f)
73+
s.cs104Server.SetConnectionLostHandler(f)
7374
}

0 commit comments

Comments
 (0)