Skip to content

Commit

Permalink
Support listening on port 19132
Browse files Browse the repository at this point in the history
  • Loading branch information
jhead committed Jan 1, 2021
1 parent 962a598 commit d9087a1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/proxy/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,9 @@ func (proxy *ProxyServer) Start() error {

// Bind to specified UDP addr and port to receive data from Minecraft clients
log.Info().Msgf("Binding proxy server to: %v", proxy.bindAddress)
if server, err := net.ListenUDP(network, proxy.bindAddress); err == nil {
proxy.server = server
if server, err := reuse.ListenPacket(network, proxy.bindAddress.String()); err == nil {
// a safe cast, I promise
proxy.server = server.(*net.UDPConn)
} else {
return err
}
Expand Down

0 comments on commit d9087a1

Please sign in to comment.