mirror of
https://github.com/strukturag/nextcloud-spreed-signaling
synced 2024-05-01 21:42:45 +02:00
Explicitly use type "sysConn".
Fixes error with newer versions of golangci-lint.
This commit is contained in:
parent
2df1dc467a
commit
e1761da4a8
|
@ -47,12 +47,12 @@ type syscallConn struct {
|
||||||
//
|
//
|
||||||
// This function returns newConn if rawConn doesn't implement syscall.Conn.
|
// This function returns newConn if rawConn doesn't implement syscall.Conn.
|
||||||
func WrapSyscallConn(rawConn, newConn net.Conn) net.Conn {
|
func WrapSyscallConn(rawConn, newConn net.Conn) net.Conn {
|
||||||
sysConn, ok := rawConn.(syscall.Conn)
|
sc, ok := rawConn.(sysConn)
|
||||||
if !ok {
|
if !ok {
|
||||||
return newConn
|
return newConn
|
||||||
}
|
}
|
||||||
return &syscallConn{
|
return &syscallConn{
|
||||||
Conn: newConn,
|
Conn: newConn,
|
||||||
sysConn: sysConn,
|
sysConn: sc,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue