mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
chore: timeout awaitNextMessage
This commit is contained in:
@@ -92,7 +92,7 @@ export const makeSocket = ({
|
||||
let onOpen: (data: any) => void
|
||||
let onClose: (err: Error) => void
|
||||
|
||||
const result = new Promise<any>((resolve, reject) => {
|
||||
const result = promiseTimeout<any>(connectTimeoutMs, (resolve, reject) => {
|
||||
onOpen = (data: any) => resolve(data)
|
||||
onClose = reject
|
||||
ws.on('frame', onOpen)
|
||||
|
||||
Reference in New Issue
Block a user