Hello everyone. Yesterday I found an interesting issue.
Say, I have a NIO TCP server and a NIO TCP client, both client and server have
IdleStateHandler in channel pipeline with 1 second timeout, and normally it works perfectly.
But when remote server crashes for some reason after it started reading client input and haven't written anything back (this isn't a problem), the client itself just hangs.
All threads are listening for an OS event, there doesn't seem to be a deadlock. I tried to debug it a little bit and found out that scheduled task from
IdleStateHandler isn't even executed. I thought that there might be a problem with my actual code and tried to recreate the problem with just some minimal bootstrap.
And guess what, the problem is still there :D I understand that it's 99% me being stupid, but I still kindly ask this lovely community to help me.
Here is an example: https://github.com/kirilltitov/swift-nio-stuck-idle