birdofpreyru/react-native-static-server

[Android]: Native implementation of `getOpenPort()` potentially needs a patch

birdofpreyru opened this issue · 1 comments

To try instead:

ServerSocket socket = new ServerSocket();
socket.setReuseAddress(true);
socket.bind(null);

Otherwise, it seems, occasionally server may fail to bind to an automatically selected port as it stays in TIME_WAIT state after the selection.

Not really needed.