Contract event subscription is not getting any data after ws reconnection

Hi guys, I have this problem when using Infura.
I have a contract event subscription like this:

contract.events.Transfer({ fromBlock: 'latest' })
.on('connected', () => {
   console.log('Event subscription connected');
})
.on('data', async (event) => {
   console.log('Got event data');
})

And use web3 with Infura ws as provider with reconnecting option.

const provider = new Web3.providers.WebsocketProvider(infura_ws_url, reconnectOption);
provider.on('connect', () => console.log('Connected to blockchain!'));

After a few days, ws connection maybe dropped and get reconnect.
I got the console.log message:

Connected to blockchain!
Event subscription connected

But can’t get event data anymore (expecting “Got event data” message). After restarting the server it works again.
So I’m not sure if it’s web3 issue or Infura one. Do I have to unsubscribe and reattach all the events after reconnecting? Please help.

Hey @Tan_Do_Ngoc - it looks like you have two threads going on this subject. I replied on this one, so let’s take the conversation over there!

sure, thanks for your help