FetchHTTP2: Handle getRemoteSocketAddress() returning null

This commit is contained in:
Alex Osborne
2025-06-20 17:27:32 +09:00
parent b20d36f607
commit 8bfde99af3
@@ -416,7 +416,9 @@ public class FetchHTTP2 extends Processor implements Lifecycle, InitializingBean
// Server IP address
var socketAddress = (InetSocketAddress) response.getRequest().getConnection().getRemoteSocketAddress();
curi.setServerIP(socketAddress.getAddress().getHostAddress());
if (socketAddress != null) {
curi.setServerIP(socketAddress.getAddress().getHostAddress());
}
// Request method
if (curi.getFetchType() != CrawlURI.FetchType.HTTP_POST) {