Fix connection closed on pause

Hi,

I suggest you add these two lines of code to avoid closing the ssh connection every time the application loses focus.

In my case, I used your application to test a Python code using the USB host mode API. The use of this API requires the permission of the user, so Android displays a dialog box to ask for it. And when this dialog box appears, the application is paused and this causes the connection reset.