mirror of
https://github.com/soypat/lneto.git
synced 2026-09-10 16:49:37 +00:00
improve TCP logging of remote ports
This commit is contained in:
+2
-2
@@ -171,7 +171,7 @@ func (conn *Conn) OpenListen(localPort uint16, iss Value) error {
|
|||||||
func (conn *Conn) Close() error {
|
func (conn *Conn) Close() error {
|
||||||
conn.mu.Lock()
|
conn.mu.Lock()
|
||||||
defer conn.mu.Unlock()
|
defer conn.mu.Unlock()
|
||||||
conn.trace("TCPConn.Close", slog.Uint64("lport", uint64(conn.h.localPort)))
|
conn.trace("TCPConn.Close", slog.Uint64("lport", uint64(conn.h.localPort)), slog.Uint64("rport", uint64(conn.h.remotePort)))
|
||||||
return conn.h.Close()
|
return conn.h.Close()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -179,7 +179,7 @@ func (conn *Conn) Close() error {
|
|||||||
func (conn *Conn) Abort() {
|
func (conn *Conn) Abort() {
|
||||||
conn.mu.Lock()
|
conn.mu.Lock()
|
||||||
defer conn.mu.Unlock()
|
defer conn.mu.Unlock()
|
||||||
conn.trace("TCPConn.Abort", slog.Uint64("lport", uint64(conn.h.localPort)))
|
conn.trace("TCPConn.Abort", slog.Uint64("lport", uint64(conn.h.localPort)), slog.Uint64("rport", uint64(conn.h.remotePort)))
|
||||||
conn.h.Abort()
|
conn.h.Abort()
|
||||||
conn.reset(conn.h)
|
conn.reset(conn.h)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user