Updated to gradle wrapper 1.8
Fixed a bug in the reconnection logic that wasn't checking if it should attempt a reconnect or not.

Also changed the reconnection test when the server drops a good connection. Now uses a more reliable test that forces closed the connection rather than relying on shutting down the server's accept thread which wasn't always working right.