Fixing blocking of chat socket that caused EAGAIN error in socket in OS X environment