Select the correct socket.io port when the application uses the default.

References #2674.