| 225 | end |
| 226 | |
| 227 | def poll_for_ready |
| 228 | start_time = Process.clock_gettime(Process::CLOCK_MONOTONIC) |
| 229 | loop do |
| 230 | return if status_ok? |
| 231 | |
| 232 | elapsed = Process.clock_gettime(Process::CLOCK_MONOTONIC) - start_time |
| 233 | raise Error, "remote server not ready in #{@timeout} seconds" if elapsed > @timeout |
| 234 | |
| 235 | sleep 0.5 |
| 236 | end |
| 237 | end |
| 238 | |
| 239 | def socket_connected? |
| 240 | @socket_connected ||= socket.connected? |
nothing calls this directly
no outgoing calls
no test coverage detected