Some confusion about channel.close() #10079
-
|
Hi all new here, I'm a bit confused and I hope to get your help. Encountered network issues when channel.close(), then may thorw IOException or TimeoutException and channel may not closed?I came up with an idea that, like this: I just want to sure channel is closed, otherwise it will no longer be useful, but it will continue to exist. I don't know if it's normal for me to do this, but I feel like it's just closing the channel specifically for loop. Is it a bit redundant? May I ask if there is a better approach? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
|
@Yuan-zs if a channel runs into a network delay, you can treat it as closed because when its connection is closed by the heartbeat mechanism, so will automatically be all the channels on it. In fact, see an alternative to close called |
Beta Was this translation helpful? Give feedback.
@Yuan-zs if a channel runs into a network delay, you can treat it as closed because when its connection is closed by the heartbeat mechanism, so will automatically be all the channels on it.
In fact, see an alternative to close called
abortin the Java client ;)