Implemented keep-alive. Bug Fix: Fixed Connect error after getting connection_error.