Increasing timeout

Last Edit: Oct 28 2020

Sometime it is necessary to increase the timeout threshold of the SDK by overwriting the default timeout when initiating the Stream Client.


final client = Client(
  AppKey,
  logLevel: Level.INFO,
  connectTimeout: Duration(milliseconds: 6000),
  receiveTimeout: Duration(milliseconds: 6000),
);
                    

ChatClient
  .Builder(AppKey, context, notificationHandler)
  .baseTimeout(6000)
  .cdnTimeout(6000)
  .build()
                    

// Client Side
const client = new StreamChat(AppKey, { timeout: 6000 });

// Server Side
const client = new StreamChat(AppKey, secret, { timeout: 6000 });