When socket is closed, retry the request

This may be wrong... Let's see