close and release connections after sync