Commit a5127f6 1 parent 716e92b commit a5127f6 Copy full SHA for a5127f6
File tree 2 files changed +7
-10
lines changed
2 files changed +7
-10
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " wa-multi-session" ,
3
- "version" : " 1.7.9 " ,
3
+ "version" : " 1.8.0 " ,
4
4
"description" : " Multi Session Whatsapp Library" ,
5
5
"main" : " dist/index.js" ,
6
6
"types" : " dist/index.d.ts" ,
Original file line number Diff line number Diff line change @@ -58,19 +58,16 @@ export const startSession = async (
58
58
callback . get ( CALLBACK_KEY . ON_CONNECTING ) ?.( sessionId ) ;
59
59
}
60
60
if ( connection === "close" ) {
61
- let retryAttempt = retryCount . get ( sessionId ) ?? 0 ;
62
- const shouldRetry = retryAttempt < 5 ;
61
+ // let retryAttempt = retryCount.get(sessionId) ?? 0;
62
+ // const shouldRetry = retryAttempt < 5;
63
63
const code = ( lastDisconnect ?. error as Boom ) ?. output ?. statusCode ;
64
- if (
65
- code == DisconnectReason . restartRequired ||
66
- ( code != DisconnectReason . loggedOut && shouldRetry )
67
- ) {
68
- retryAttempt = retryAttempt + 1 ;
69
- retryCount . set ( sessionId , retryAttempt ) ;
64
+ if ( code !== DisconnectReason . loggedOut ) {
65
+ // retryAttempt = retryAttempt + 1;
66
+ // retryCount.set(sessionId, retryAttempt);
70
67
startSocket ( ) ;
71
68
} else {
72
- callback . get ( CALLBACK_KEY . ON_DISCONNECTED ) ?.( sessionId ) ;
73
69
deleteSession ( sessionId ) ;
70
+ callback . get ( CALLBACK_KEY . ON_DISCONNECTED ) ?.( sessionId ) ;
74
71
}
75
72
}
76
73
if ( connection == "open" ) {
You can’t perform that action at this time.
0 commit comments