mirror of
https://github.com/strukturag/nextcloud-spreed-signaling
synced 2024-05-17 21:16:33 +02:00
Merge pull request #416 from strukturag/golangci-fix
Explicitly use type "sysConn".
This commit is contained in:
commit
955a623419
|
@ -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