fixed server bug, added long connection timeout