Probably not only rely on that, but also try to check against http://msdn.microsoft.com/en-US/library/system.net.sockets.socketexception.socketerrorcode(v=vs.110).aspx when doing such special case actions.