Improved AC socket fix

This provides better coverage for socket shutdown needs, but intends
to fix the same issue as the previous commit.

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Signed-off-by: Mike Rylander <mrylander@gmail.com>