fix tcpsocket: may fail when first connection attempt did not succeed
fix tcpsocket: may fail when first connection attempt did not succeed

maekitalo/cxxtools,maekitalo/cxxtools,maekitalo/cxxtools,maekitalo/cxxtools