Try to join surfaces and get this warning

Some non-manifold configuration are detected. How to resolve that?