Skip to content

Commit

Permalink
Sort out ptr mess
Browse files Browse the repository at this point in the history
Signed-off-by: Vasyl Gello <[email protected]>
  • Loading branch information
basilgello committed Jul 15, 2024
1 parent 5dac46f commit c6f45bb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/yggstack/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -374,12 +374,12 @@ func main() {
connVal, ok := remoteUdpConnections.Load(remoteUdpAddr)

if !ok {
udpFwdConn, err = net.DialUDP("udp", nil, mapping.Mapped)
*udpFwdConn, err = net.DialUDP("udp", nil, mapping.Mapped)

Check failure on line 377 in cmd/yggstack/main.go

View workflow job for this annotation

GitHub Actions / Build Windows/Linux/MacOS/FreeBSD/Android

cannot use net.DialUDP("udp", nil, mapping.Mapped) (value of type *net.UDPConn) as net.UDPConn value in assignment
if err != nil {
logger.Errorf("Failed to connect to %s: %s", mapping.Mapped, err)
continue
}
remoteUdpConnections.Store(remoteUdpAddr, &udpFwdConn)
remoteUdpConnections.Store(remoteUdpAddr, udpFwdConn)
go types.ReverseProxyUDP(mtu, udpListenConn, remoteUdpAddr, udpFwdConn)

Check failure on line 383 in cmd/yggstack/main.go

View workflow job for this annotation

GitHub Actions / Build Windows/Linux/MacOS/FreeBSD/Android

cannot use udpFwdConn (variable of type *net.UDPConn) as net.UDPConn value in argument to types.ReverseProxyUDP
} else {
udpFwdConn = connVal.(*net.UDPConn)
Expand Down

0 comments on commit c6f45bb

Please sign in to comment.