[PATCH] util: Fix max socket calculation