add locking around subtitle extraction
look at close status before assuming socket is closed.