socket sync operation added to avoid early termination of server