- improved socket error handling (was giving errors when it shouldn't)