mirror of
https://github.com/lwch/natpass.git
synced 2026-10-21 05:09:24 +00:00
修改转发方式
This commit is contained in:
@@ -31,14 +31,11 @@ func (p *Pool) SendDisconnect(id, to string) {
|
||||
|
||||
// SendData send forward data
|
||||
func (p *Pool) SendData(id, to string, data []byte) {
|
||||
dup := func(data []byte) []byte {
|
||||
ret := make([]byte, len(data))
|
||||
copy(ret, data)
|
||||
return ret
|
||||
}
|
||||
dup := make([]byte, len(data))
|
||||
copy(dup, data)
|
||||
p.writeForward <- forwardData{
|
||||
to: to,
|
||||
id: id,
|
||||
data: dup(data),
|
||||
data: dup,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user