Closed
Description
We want to be able to terminate our program early (e.g. on SIGTERM).
It was possible to some extent before this commit 8dd49eb
You could just call BinaryLogClient.disconnect()
on program termination. If BinaryLogClient.channel
is already set, then it disconnects, if not - no big deal (that being said, there were possible race conditions).
Now disconnect
waits for connectLock
which is released only after channel is created and at least one byte is successfully read. The problem is that in theory channel.peek()
may block for indefinitely long time, so we have no way to shutdown gracefully.
Possible solution is to introduce connect timeout. It may be used not only with peek
but with socket.connect
as well.
Metadata
Metadata
Assignees
Labels
No labels