netty5/transport
Norman Maurer 699d3fcd54
Remove assert check that is not valid anymore now that an Channel is tied to an EventLoop from the beginning. (#9966)
Motivation:

Because we now tie and EventLoop to a Channel from the beginning its possible that we schedule something on it before the registration with the Selector is done. This can lead to AssertionErrors in the current form of the code like:

java.lang.AssertionError
	at io.netty.channel.nio.AbstractNioChannel.selectionKey(AbstractNioChannel.java:109)
	at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.isFlushPending(AbstractNioChannel.java:344)
	at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.flush0(AbstractNioChannel.java:332)
	at io.netty.channel.AbstractChannel$AbstractUnsafe.flush(AbstractChannel.java:855)
	at io.netty.channel.DefaultChannelPipeline$HeadHandler.flush(DefaultChannelPipeline.java:1253)
	at io.netty.channel.DefaultChannelHandlerContext.invokeFlush(DefaultChannelHandlerContext.java:747)
	at io.netty.channel.DefaultChannelHandlerContext.access$1300(DefaultChannelHandlerContext.java:38)
	at io.netty.channel.DefaultChannelHandlerContext$WriteAndFlushTask.write(DefaultChannelHandlerContext.java:1144)
	at io.netty.channel.DefaultChannelHandlerContext$AbstractWriteTask.run(DefaultChannelHandlerContext.java:1055)
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:360)
	at io.netty.channel.SingleThreadEventLoop.run(SingleThreadEventLoop.java:200)
	at io.netty.util.concurrent.SingleThreadEventExecutor.lambda$doStartThread$4(SingleThreadEventExecutor.java:855)
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:75)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.lang.Thread.run(Thread.java:748)

Modifications:

Remove assert and add a few null checks.

Result:

No more java.lang.AssertionError.
2020-01-24 14:10:14 -08:00
..
src Remove assert check that is not valid anymore now that an Channel is tied to an EventLoop from the beginning. (#9966) 2020-01-24 14:10:14 -08:00
pom.xml Correcting Maven Dependencies (#8622) 2018-12-06 09:02:00 +01:00