if ( sideA.connection != null )
{
if ( sideA.connection.connection != null )
{
sideA.connection.connection.destroy();
sideA.connection = new ConnectionWrapper( null );
}
}
if ( sideB.connection != null )
{
if ( sideB.connection.connection != null )
{
sideB.connection.connection.destroy();
sideB.connection = new ConnectionWrapper( null );
}
}
sideA.connection = sideB.connection = new ConnectionWrapper( AEApi.instance().createGridConnection( sideA.getNode(), sideB.getNode() ) );
}
catch (FailedConnection e)
{
// :(
}
}
else
shutdown = true;
}
else
shutdown = true;
if ( shutdown && connection != null )
{
if ( connection.connection != null )
{
connection.connection.destroy();
connection.connection = null;
connection = new ConnectionWrapper( null );
}
}
}