Update threaded-server.c

Fix filedescriptors