Wifi Battle keeps disconnecting

Hello there, when me and my friend wifi battle on Ultra Sun and Ultra Moon, the battle randomly disconnects halfway through the battle, any idea to why this may happen?

In order for us to provide better support, we need to see the log generated by Citra. This guide will walk you through how you can obtain the log file: How to Upload the Log File.