LanternPowered / Terre

A proxy server for Terraria which adds support for cross-platform, multi-world and more.
MIT License
18 stars 3 forks source link

Forward server disconnect messages to client #14

Closed Cybermaxke closed 1 year ago

Cybermaxke commented 1 year ago

Unable to join any backing server because the server is in journey mode, but the character is not. The client disconnect should be the first disconnect message instead of the generic "Failed to connect to a server" message.


[23:32:15] [netty-worker-2/INFO] [Terre] [org.lanternpowered.terre.impl.network.backend.ServerPlayConnectionHandler.handle(ServerPlayConnectionHandler.kt:65)]: Got disconnect: DisconnectPacket(reason=LocalizedText(key=Net.PlayerIsNotCreativeAndWorldIsCreative, substitutions=))
[23:32:15] [netty-worker-2/DEBUG] [Terre] [org.lanternpowered.terre.impl.network.Connection.exceptionCaught(Connection.kt:229)]: A netty connection error occurred
java.net.SocketException: Connection reset
    at sun.nio.ch.SocketChannelImpl.throwConnectionReset(SocketChannelImpl.java:394) ~[?:?]
    at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:426) ~[?:?]
    at io.netty.buffer.PooledByteBuf.setBytes(PooledByteBuf.java:259) ~[netty-buffer-4.1.86.Final.jar:4.1.86.Final]
    at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1132) ~[netty-buffer-4.1.86.Final.jar:4.1.86.Final]
    at io.netty.buffer.WrappedByteBuf.writeBytes(WrappedByteBuf.java:821) ~[netty-buffer-4.1.86.Final.jar:4.1.86.Final]
    at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:357) ~[netty-transport-4.1.86.Final.jar:4.1.86.Final]
    at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:151) ~[netty-transport-4.1.86.Final.jar:4.1.86.Final]
    at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:788) ~[netty-transport-4.1.86.Final.jar:4.1.86.Final]
    at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724) ~[netty-transport-4.1.86.Final.jar:4.1.86.Final]
    at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650) ~[netty-transport-4.1.86.Final.jar:4.1.86.Final]
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562) ~[netty-transport-4.1.86.Final.jar:4.1.86.Final]
    at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[netty-common-4.1.86.Final.jar:4.1.86.Final]
    at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.86.Final.jar:4.1.86.Final]
    at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-common-4.1.86.Final.jar:4.1.86.Final]```