Hi,
I need to avoid auto reconnecting with :
- ([COLOR=#BB2CA2]void[/COLOR]) clientConnection :Smile_Ac:  [COLOR=#4F8187]LSClient[/COLOR]*)client didReceiveServerFailure :Smile_Ac: [COLOR=#4F8187]LSPushServerException[/COLOR]  *)failure
{
 [COLOR=#3D1D81][COLOR=#000000][[/COLOR] [COLOR=#4F8187]_client[/COLOR]performSelectorInBackground[COLOR=#000000] :Smile_Ah: /COLOR][COLOR=#BB2CA2]@selector[/COLOR][COLOR=#000000](closeConnection) [/COLOR]withObject[COLOR=#000000] :Smile_Ah: /COLOR][COLOR=#BB2CA2]nil[/COLOR][COLOR=#000000]];[/COLOR][/COLOR]
}
but i recent error on :
[COLOR=#31595D][COLOR=#000000][[/COLOR][COLOR=#4f8187]_client[/COLOR]openConnectionWithInfo[COLOR=#000000]:connectioninfo [/COLOR]delegate[COLOR=#000000] :Smile_Ah: /COLOR][COLOR=#bb2ca2]self[/COLOR][COLOR=#000000]];[/COLOR][/COLOR]
Thread 8: signal SIGABRT
Hello Ebrahim,

I added this code to the sample I've provided you through support, and it works without problems. I can send the updated code to you again via support.

My advice is to check for memory management issues in your code, e.g.: check if you retained correctly the objects you are using, like the connectionInfo.

Hope this helps.
Best regards,

Gianluca
Hello Gianluca,
My Code is :
- (void)connectWithLightStreamer
{

fieldNames = [ NSArrayarrayWithObjects :LIGHTSTREAMER_FIELDNAMES, nil];
[ selfperformSelectorInBackground: @selector(connectInBackground) withObject:nil];

}
- (void) connectInBackground
{
_client = [[ LSClient alloc ]init ];
LSConnectionInfo *connectioninfo = [LSConnectionInfoconnectionInfoWithPushServerURL : LIGHTSTREAMER_CONNECITON_ADDRESSpushServerControlURL : niluser :@"username" password:@"password" adapter:LIGHTSTREAMER_CONNECITON_ADAPTER];
[ _clientopenConnectionWithInfo:connectioninfo delegate:self];
}
- (void) clientConnection :Smile_Ac: LSClient*)client didReceiveServerFailure :Smile_Ac: LSPushServerException *)failure {


[ _clientperformSelectorInBackground: @selector(closeConnection) withObject:nil];

}

but i receive error : Thread 8:signal SIGABRT
Hello Ebrahim,

to trace this problem I will need full logs and possibly a crash dump. You should add the following lines to your application:didFinishLaunchingWithOptions: delegate:

[ LSLogenableSourceType: LOG_SRC_CLIENT];
[ LSLogenableSourceType: LOG_SRC_SESSION];
[ LSLogenableSourceType :LOG_SRC_STATE_MACHINE];

Then run your app until you get the crash, save the crash dump and contact support sending both the crash dump and the logs the app has produced.

Thanks.
Best regards,

Gianluca

    gianluca.bertani Hello Ebrahim,

    to trace this problem I will need full logs and possibly a crash dump. You should add the following lines to your application:didFinishLaunchingWithOptions: delegate:

    [ LSLogenableSourceType:LOG_SRC_CLIENT];
    [ LSLogenableSourceType:LOG_SRC_SESSION];
    [ LSLogenableSourceType:LOG_SRC_STATE_MACHINE];

    Then run your app until you get the crash, save the crash dump and contact support sending both the crash dump and the logs the app has produced.

    Thanks.
    Best regards,

    Gianluca



    Hi Gianluca,
    2013-05-28 17:34:03.723 M-Trader [5095:3c07]<Thread 0x6d264e0> LSClient 0x7c5cad0: opening connection...
    2013-05-28 17:34:03.724 M-Trader [5095:4303]<Thread 0x7b15c60> LSConnectionStateMachine 0x7b15ae0: thread started
    2013-05-28 17:34:03.725 M-Trader [5095:4303]<Thread 0x7b15c60> LSConnectionStateMachine 0x7b15ae0: handling event 1001 in state 0...
    2013-05-28 17:34:03.726 M-Trader [5095:4d03]<Thread 0x6d389a0> iSLSession 0x6d376d0: creating connection to http://{myURL}
    2013-05-28 17:34:03.728 M-Trader [5095:4d03]<Thread 0x6d389a0> iSLSession 0x6d376d0: connection started to http://{myURL}
    2013-05-28 17:34:04.329 M-Trader [5095:4d03]<Thread 0x6d389a0> iSLSession 0x6d376d0: connection failed with error: Error Domain=NSURLErrorDomain Code=-1004 "Could not connect to the server." UserInfo=0x7bb50d0 {NSErrorFailingURLStringKey= http://{myURL}/lightstreamer/create_session.txt, NSErrorFailingURLKey=http://{myURL}/lightstreamer/create_session.txt, NSLocalizedDescription=Could not connect to the server., NSUnderlyingError=0x7b1e610 "Could not connect to the server."}
    2013-05-28 17:34:04.331 M-Trader [5095:4303]<Thread 0x7b15c60> LSConnectionStateMachine 0x7b15ae0: handling event 3003 in state 101...
    2013-05-28 17:34:04.331 M-Trader [5095:4d03]<Thread 0x6d389a0> iSLSession 0x6d376d0: connection stopped to http://{myURL}
    2013-05-28 17:34:04.332 M-Trader [5095:6003]<Thread 0x785b270> LSClient 0x7c5cad0: interrupting connection open...
    2013-05-28 17:34:04.332 M-Trader [5095:4303]<Thread 0x7b15c60> LSConnectionStateMachine 0x7b15ae0: handling event 1103 in state 105...
    2013-05-28 17:34:04.333 M-Trader [5095:4d07]<Thread 0x7b0f630> LSConnectionStateMachine 0x7b15ae0: cleaning up session...
    2013-05-28 17:34:04.333 M-Trader [5095:3c07]*** Terminating app due to uncaught exception 'Lightstreamer connection exception', reason: 'Stream error occurred (reason: 'Error code -1004: Could not connect to the server.')'
    *** First throw call stack:
    (0x1a8d052 0x187cd0a 0x136b8e 0xa1a31 0x10274e6 0x1027457 0x9898d557 0x98977cee)
    terminate called throwing an exception2013-05-28 17:34:04.333 M-Trader [5095:6003]<Thread 0x785b270> LSClient 0x7c5cad0: connection open interrupted
    2013-05-28 17:34:06.911 M-Trader [5095:4d07]<Thread 0x7b0f630> LSConnectionStateMachine 0x7b15ae0: session cleaned up

    Hello Ebrahim,

    it seems what you are experiencing is not a crash due to some sort of bug, but simply an uncaught exception. As stated in the LS client library documentation set, openConnectionWithInfomay raise two kind of exceptions (LSPushServerException and LSPushConnectionException) and thus you need a try/catch block, such as:

    @try {
    [_client openConnectionWithInfo:connectioninfo delegate:self];

    } @catch (NSException *e) {
    NSLog(@"Can't connect due to exception: %@", e);
    }

    Best regards,

    Gianluca
    Hello Gianluca,
    Thank you my problem was solved