cc-tweaked / CC-Tweaked

Just another ComputerCraft fork
https://tweaked.cc
935 stars 211 forks source link

Error handling HTTP response #1975

Closed Ale32bit closed 3 weeks ago

Ale32bit commented 2 months ago

Minecraft Version

1.20.1

Version

1.113.1

Details

The console get spammed with the following error:

[ComputerCraft-Netty-2/ERROR] [da.co.co.ap.ht.re.HttpRequestHandler/COMPUTER_ERROR.HTTP]: Error handling HTTP response
java.net.SocketException: Connection reset
        at sun.nio.ch.SocketChannelImpl.throwConnectionReset(Unknown Source) ~[?:?] {}
        at sun.nio.ch.SocketChannelImpl.read(Unknown Source) ~[?:?] {}
        at io.netty.buffer.PooledByteBuf.setBytes(PooledByteBuf.java:258) ~[netty-buffer-4.1.82.Final.jar%2380!/:4.1.82.Final] {}
        at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1132) ~[netty-buffer-4.1.82.Final.jar%2380!/:4.1.82.Final] {}
        at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:357) ~[netty-transport-4.1.82.Final.jar%2385!/:4.1.82.Final] {}
        at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:151) ~[netty-transport-4.1.82.Final.jar%2385!/:4.1.82.Final] {}
        at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:788) ~[netty-transport-4.1.82.Final.jar%2385!/:4.1.82.Final] {}
        at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724) ~[netty-transport-4.1.82.Final.jar%2385!/:4.1.82.Final] {}
        at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650) ~[netty-transport-4.1.82.Final.jar%2385!/:4.1.82.Final] {}
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562) ~[netty-transport-4.1.82.Final.jar%2385!/:4.1.82.Final] {}
        at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[netty-common-4.1.82.Final.jar%2382!/:4.1.82.Final] {}
        at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.82.Final.jar%2382!/:4.1.82.Final] {}
        at java.lang.Thread.run(Unknown Source) ~[?:?] {re:mixin}

This is running on a public server so I have no idea how to reproduce.

SquidDev commented 4 weeks ago

Yeah, I'm not quite sure what to do about this. Logging HTTP failures often is useful (especially when debugging SSL failures), but obviously not to the point of spamming the logs.

We should probably: