[PATCH 1/1] server: Check socket flags after all sockets got processed