fixed wait and polling in connection