Fix networking test. Add error to connect.

And disable all optimisations for clang/osx
to speed the build up.