Instead of trying to connect/read five times for one second (using a fresh socket every time) this now just tries one time for five seconds. The previous strategy can cause the code to not connect or read anything at all if the connection or reading the initial byte consistently takes more than one second.
Instead of trying to connect/read five times for one second (using a fresh socket every time) this now just tries one time for five seconds. The previous strategy can cause the code to not connect or read anything at all if the connection or reading the initial byte consistently takes more than one second.