Previously, when a Unix Shared Memory connection was lost and the server did not remove it, the client waited 5 seconds before timing out and checking the state of the connection.
This improvement makes the first client timeout a timed wait of 50 milliseconds, and successive waits (for a long c-tree call such as a rebuild) time out in 5 seconds. Since most c-tree calls will return in under 1 millisecond, a single 50 millisecond timeout will not normally add overhead and gives the feel of an immediate return in the event a connection has been lost. The Shared Memory header is now checked and avoids a timeout if the server disconnected cleanly.