[#924] [#914] Fix high CPU usage which was caused because the OP_CONNECT flag was not cleared after the connect was complete