added socket timeout. Fixed indexoutofrange error on multiple server support