HimbeerserverDE / multiserver

[DEPRECATED: use mt-multiserver-proxy instead] Minetest reverse proxy supporting multiple servers and media multiplexing
MIT License
8 stars 4 forks source link

Uses rudp.ErrClosed, which is deprecated. #18

Closed anon55555 closed 3 years ago

anon55555 commented 3 years ago

You should use net.ErrClosed (added in Go 1.16) instead.

LizzyFleckenstein03 commented 3 years ago

I don't think it's a good idea to change the required go version.

anon55555 commented 3 years ago

Why not?

LizzyFleckenstein03 commented 3 years ago

Because this already happened to my server using multiserver. Luckily its not in production yet.

../go/src/github.com/anon55555/mt/rudp/listen.go:65:17: undefined: net.ErrClosed
../go/src/github.com/anon55555/mt/rudp/net.go:9:17: undefined: net.ErrClosed
../go/src/github.com/anon55555/mt/rudp/net.go:29:22: undefined: net.ErrClosed
../go/src/github.com/anon55555/mt/rudp/peer.go:95:19: undefined: net.ErrClosed
../go/src/github.com/anon55555/mt/rudp/peer.go:111:10: undefined: net.ErrClosed
../go/src/github.com/anon55555/mt/rudp/send.go:129:15: undefined: net.ErrClosed
anon55555 commented 3 years ago

You should update Go then.

LizzyFleckenstein03 commented 3 years ago

It needs to be automized. Will sudo snap refresh go --edge do it?

anon55555 commented 3 years ago

Maybe I'll give some advance warning if I do something like this in future.

anon55555 commented 3 years ago

It needs to be automized. Will sudo snap refresh go --edge do it?

Edge will give you the current development version, 1.16/stable is the latest release but it seems latest/stable is still on 1.15.8.

anon55555 commented 3 years ago

or you could do this:

cd /usr/local
rm -rf go
curl https://golang.org/dl/go1.16.linux-amd64.tar.gz | tar xz

then put /usr/local/go/bin in your PATH

anon55555 commented 3 years ago

sudo snap refresh go --channel 1.16/stable should work too

LizzyFleckenstein03 commented 3 years ago

Ok, thanks a lot.

HimbeerserverDE commented 3 years ago

Replaced rudp.ErrClosed with net.ErrClosed and updated go.mod, can this be closed now?

anon55555 commented 3 years ago

yes