Made keepAlive interval configurable in connect