Start a conversation

The "Socket closed by remote peer" error

When you receive the error:

QBChat/didDisconnect, error: Error Domain=GCDAsyncSocketErrorDomain Code=7 "Socket closed by remote peer" UserInfo=0x10e58040 {NSLocalizedDescription=Socket closed by remote peer}, 

Then there can be several reasons of why your application got disconnected. It is absolutely normal to perform reconnect. 

For instance, you can make silent reconnect, instead of showing login screen again and again - just save user’s credentials in your app and reconnect with them.

The implementation of reconnection logic is similar to the implementation of connection logic.

Here is the link to our official documentation: Introduction | QuickBlox

Choose files or drag and drop files
Was this article helpful?
  1. Maksym Pidhorbunskyi

  2. Posted
  3. Updated