mirror of
https://github.com/onyx-and-iris/q3rcon.git
synced 2026-09-04 01:54:29 +00:00
upd connection info log
This commit is contained in:
3
conn.go
3
conn.go
@@ -3,8 +3,6 @@ package q3rcon
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"net"
|
"net"
|
||||||
|
|
||||||
"github.com/charmbracelet/log"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type UDPConn struct {
|
type UDPConn struct {
|
||||||
@@ -20,7 +18,6 @@ func newUDPConn(host string, port int) (*UDPConn, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
log.Infof("Outgoing address %s", conn.RemoteAddr())
|
|
||||||
|
|
||||||
return &UDPConn{
|
return &UDPConn{
|
||||||
conn: conn,
|
conn: conn,
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ func New(host string, port int, password string, options ...Option) (*Rcon, erro
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("error creating UDP connection: %w", err)
|
return nil, fmt.Errorf("error creating UDP connection: %w", err)
|
||||||
}
|
}
|
||||||
|
log.Infof("Rcon outgoing address %s", conn.conn.RemoteAddr())
|
||||||
|
|
||||||
r := &Rcon{
|
r := &Rcon{
|
||||||
conn: conn,
|
conn: conn,
|
||||||
|
|||||||
Reference in New Issue
Block a user