How to handle timeout exception in fyers socket on internet disconnectivity

I have subscribed for nifty throgh ws.FyersSocket. 

fyersSocket = ws.FyersSocket(access_token=tok_sock,data_type=data_type,symbol=symbol)

fyersSocket.subscribe()

But if disconnected from internet it shows "Exception is 'NoneType' object is not subscriptable

and then

OSError: [WinError 121] The semaphore timeout period has expired      

Exception is code = 1006 (connection closed abnormally [internal]), no reason

and program/script stops. My doubts are

  1. How to handle/catch these internal exceptions and try to reconnect?
  2. How to subscribe asynchronously?
  3. Where can I get full documentaion of ws.FyersSocket class and all related classes?