Yep, on *nix... I gave that a try and found sleep(1); was still needed before closing the socket. Incidentally, the message is displayed by other clients like xChat and telnet.

The man page isn't much help, but as near as I can tell all shutdown() does (becides giving more control over tearing down the socket) is throw away any data that might have arrived.

Here's some simple code if anyone wants to play.