This should be replaced with a dispatch_source, polling like this is bad, should just happen over the socket when it needs to.