Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
peakedshout committed Mar 14, 2023
1 parent 6170303 commit 687d987
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func LinkProxyServer(name, addr, key string) (*DeviceBox, error) {
box := newBox(name, addr, key)
conn, err := net.DialTCP("tcp", nil, box.addr)
if err != nil {
box.SetWarnLog(err)
loger.SetLogWarn(err)
return nil, err
}
box.conn = conn
Expand Down
2 changes: 1 addition & 1 deletion loger/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func Sprint(a ...any) string {
}

func SprintConn(conn net.Conn, a ...any) string {
if conn == nil || conn.LocalAddr() == nil || conn.RemoteAddr() == nil {
if conn == nil {
return Sprint("[", "No network", "] :", Sprint(a...))
}
return Sprint("[", conn.LocalAddr().String(), "->", conn.RemoteAddr().String(), "] :", Sprint(a...))
Expand Down

0 comments on commit 687d987

Please sign in to comment.