How do you cancel Network.Connect() thats in proccess of running?

is there a way to stop attemping to Network.Connect, when a button is clicked, it has to be able to also cancel, and i cant use Network.Disconnect because i havent connected either.

Network.Disconnect()

See HERE.

Actually there is no “process” of connecting. When you try to connect to a server you send a package to the server and wait for a response. This is totally passive. There is usually a timeout which kicks in when no replies arrives. If the connect packet can’t be routed to the server you might get a response from the router which would indicate an connection error. But it’s also possible that the packet is kind of “lost” or the reply couldn’t be routed back to you or there’s simply no server who could answer. For such cases the timeout triggers a timeout error.

Connecting to a server usually happens within 100ms - 200ms. If not you will probably run into a timeout. The best bet to cancel the “waiting” is, like KiraSensei said, Network.Disconnect().