WallarooLabs / pony-kafka

:horse: Pure Pony Kafka client
Other
57 stars 4 forks source link

Mark connection as readable and read data on connect/reconnect #52

Closed dipinhora closed 6 years ago

dipinhora commented 6 years ago

Prior to this commit the CustomTCPConnectionHandler logic did not set the connection as readable and/or try to read data when a new connection or re-established connection occurred. This resulted in the behavior seen in https://github.com/WallarooLabs/wallaroo/issues/2281 as part of the 0.5.0 release of Wallaroo.

This commit properly sets the connection as readable and tries to read data on a connect/reconnect. It also combines the connect and reconnect logic into a single if statement to avoid duplicating the same logic to make maintenance a bit easier.