Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove netty5 Unsafe class #2338

Merged
merged 1 commit into from Jun 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -437,7 +437,7 @@ void initChild(final Channel child) {
}

static void forceClose(Channel child, Throwable t) {
child.unsafe().closeForcibly();
child.close();
log.warn(format(child, "Failed to register an accepted channel: {}"), child, t);
}
}
Expand Down
Expand Up @@ -323,14 +323,14 @@ static Mono<Channel> doInitAndRegister(
channel.close();
}
else {
channel.unsafe().closeForcibly();
channel.close();
}
monoChannelPromise.setFailure(f.cause());
}
});
}
else {
channel.unsafe().closeForcibly();
channel.close();
monoChannelPromise.setFailure(future.cause());
}
});
Expand Down
Expand Up @@ -22,6 +22,7 @@
import io.netty5.channel.ChannelOutboundBuffer;
import io.netty5.channel.ChannelShutdownDirection;
import io.netty5.channel.embedded.EmbeddedChannel;
import io.netty5.util.concurrent.Promise;
import org.junit.jupiter.api.Test;
import reactor.util.annotation.Nullable;

Expand Down Expand Up @@ -123,11 +124,6 @@ static class TestChannel extends AbstractChannel {
this.remoteAddress = remoteAddress;
}

@Override
protected AbstractUnsafe newUnsafe() {
return null;
}

@Override
public SocketAddress localAddress() {
return localAddress0();
Expand Down Expand Up @@ -172,6 +168,10 @@ protected void doBeginRead() {
protected void doWrite(ChannelOutboundBuffer in) {
}

@Override
protected void connectTransport(SocketAddress remoteAddress, SocketAddress localAddress, Promise<Void> promise) {
}

@Override
public ChannelConfig config() {
return null;
Expand Down