Replies: 2 comments 1 reply
-
After |
Beta Was this translation helpful? Give feedback.
-
Update: |
Beta Was this translation helpful? Give feedback.
-
After |
Beta Was this translation helpful? Give feedback.
-
Update: |
Beta Was this translation helpful? Give feedback.
-
Hi,
What happens if both await and AddListener methods use for a single future. I'm working with a code written like that.
Below are the basic flow;
I've noticed that randomly the listener method does not get called in this method. Is this because of the use of the await method?
I'm planning to remove the await call here.
I would like to know if await method calls before the AddListener method is there any possibility that the listener does not get called. As I've came across such situations randomly. I want to to know the exact reason why the listener does not get called in this code randomly.
Thanks in advance.
P.S.:
I had a log line (Log line 1) inside of the if block (if (channelFuture.isSuccess()) {) And that was printed in the log file. But not in the log line (Log line 2) which was in the if (future.isSuccess()) { block in the Listener. Simply log line 1 was printed in the log file, but log line 2 was not printed. So the future was a success but the listener was not getting called even the isSuccess returns true.
If it happened because of the redundant Await method, I can happily remove that. But I want to know that for surely if there is any other reason for this.
Beta Was this translation helpful? Give feedback.
All reactions