Skip to content

Commit 48c7309

Browse files
author
刘河
committed
Bug
1 parent f2329f7 commit 48c7309

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

bridge/bridge.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ func (s *Bridge) SendLinkInfo(clientId int, link *conn.Link, linkAddr string) (t
309309
v.linkMap[link.Id] = link
310310
v.Unlock()
311311
if !s.waitStatus(clientId, link.Id) {
312-
err = errors.New("connect fail")
312+
err = errors.New(fmt.Sprintf("connect target %s fail", link.Host))
313313
return
314314
}
315315
} else {

lib/conn/link.go

+3
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ func (s *Link) Run(flow bool) {
5454
}
5555
return
5656
} else {
57+
if s.Conn == nil {
58+
return
59+
}
5760
if s.UdpListener != nil && s.UdpRemoteAddr != nil {
5861
s.UdpListener.WriteToUDP(content, s.UdpRemoteAddr)
5962
} else {

0 commit comments

Comments
 (0)