title: {"code":1,"message":"Session ID unknown"} while connecting users to socket.io for first attempt
body: <p>I am developing chat application using socket.io in objective-c. I am facing issue of loosing offline messages.
  The scenario is while I have couple of offline messages in queue, when client(iOS App) is connected. Initially it disconnects directly saying "Session ID Unknown".
  Below is the code of connection using socket</p>
  
  <pre><code>NSURL* url = [[NSURL alloc] initWithString:@"MYURL"];
  self.socket = [[SocketIOClient alloc] initWithSocketURL:url config:@{@"log": @NO, @"reconnectAttempts" : @50, @"reconnects" : @YES, @"forcePolling": @YES}];
  
  if (![self.socket.engine connected])
  {
      [self.socket connectWithTimeoutAfter:20000 withHandler:^{
          NSLog(@"Socket Conencted");
      }];
  }
  
  [self.socket off:@"disconnect"];
  [self.socket off:@"error"];
  [self.socket off:@"add user"];
  [self.socket off:@"private message"];
  [self.socket off:@"connect"];
  [self.socket off:@"startChat"];
  [self.socket off:@"delivered"];
  [self.socket off:@"user image"];
  [self.socket off:@"received server"];
  
  [self.socket on:@"connect" callback:^(NSArray * data, SocketAckEmitter * ack) {
  }];
  
  [self.socket on:@"user image" callback:^(NSArray * data, SocketAckEmitter * ack) {
  }];
  
  .....
  </code></pre>
  
  <p><a href="https://github.com/socketio/socket.io-client-swift/files/737574/Logs_Application.txt" rel="nofollow noreferrer">Logs_Application.txt</a></p>
  
  <p>Chat working properly but some times it loosing messages and delivery reports.</p>
  
  <p>However, this kind of issue is not observed in all users, but couple of users are facing this kind of issue.</p>
  
  <p>Looking forward to hear with some solution for the same.</p>
  
  <p>Let me know if I can provide more information for better understanding the issue.</p>