Code: Select all
A real undefined error.System.NullReferenceException: Object reference not set to an instance of an object
at Sfs2X.Bitswarm.BitSwarmClient.Connect (System.String host, Int32 port) [0x00000] in <filename unknown>:0
at Sfs2X.SmartFox.Connect (System.String host, Int32 port) [0x00000] in <filename unknown>:0
at SFS_Connect.Connect () [0x0005c] in
Steps to reproduce :
1. Connect to Smartfox after smartfox object is initialized.
Code: Select all
smartFox.Connect (serverIP, serverPort);
2. Get a failed connection response, eg. connect to invalid or server that is offline or no net connection.
Code: Select all
public void OnConnection(BaseEvent evt) {
bool success = (bool)evt.Params["success"];
3. Attempt to reconnect, either with a timer or immediate.
Code: Select all
smartFox.Connect (serverIP, serverPort);
4. Observer error with
Code: Select all
try {
smartFox.Connect (serverIP, serverPort);
} catch(Exception exception) {
Debug.Log(exception);
}