The SocketException is thrown if I forcefully close one part of an active connection. This of course disrupts the connection and the IOExceotion is thrown and caught in the code above, but this creates an endless while loop, due to the handler.isActive() never becoming inactive, and thus the whole application crashes.
I tried to put a return statement after the e.printStackTrace, and this stopped the application from crashing.
In the code from the SpaceRepository I have come across some missing error handling...
The SocketException is thrown if I forcefully close one part of an active connection. This of course disrupts the connection and the IOExceotion is thrown and caught in the code above, but this creates an endless while loop, due to the handler.isActive() never becoming inactive, and thus the whole application crashes.
I tried to put a return statement after the e.printStackTrace, and this stopped the application from crashing.