How to reconnect after getting disconnected?

Say your server got offline and your app exceeded the number of reconnection attempts. Then after a while the server goes up, how can we reconnect to it again?

This is my code:

	const ws = adonis.Ws(url, {
		reconnection: true,
		reconnectionAttempts: 5


        ws.on('open', () => { console.log('Connected');  });

And then I have a button that triggers this:


But I don’t get the Connected log anymore. Is there a proper way of doing this? Thanks.