use enum retired_fd instead of -1

using -1 causes a warning on Windows platform because SOCKET is unsigned.

In particular, compilation with MinGW will fail because of -Werror