I'm trying to subscribe to events logs to handle
Transfer(address,address,uint64) events. I've followed this example.
However, when there are no incoming events I get an
EOF error and the app quits. I tried to prevent the app quitting by removing the log.Fatal(err). However, any subsequent JSON-RPC call to the blockchain will result in write
tcp xx.xx.xx.xx:42542->xx.xx.xx.xx:443: i/o timeout errors. Is there any way to close the socket gracefully without quitting the app?
Basically what I want to do is to continuously subscribe to the event and recover from any errors.