Handle prematurely closed connections in sync