vmpooler 2.4.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4642648148ddd5b7d470163c4509ccad6f3a377f0f20dc1a43a940aaacf6a157
4
- data.tar.gz: 7fe2d19cbfb839a750872d09adf01048d23dba9aa345b6e1150e3787f5c47f51
3
+ metadata.gz: cfe402b5631b6e688652f35e2c037262a2ffac519b20056cb77568f42a91276f
4
+ data.tar.gz: 05543eaca4e5fc1503b8cef7cb0d97acdc3967a4548442a7d062b7f462322062
5
5
  SHA512:
6
- metadata.gz: bf2dc2f68527913308264c10f7c986523e9bc4922cc1b1283a9125596d74e474f30ae973ecec7c29c6c7f524ab016cc98e59caffa690185af588e00505de7a0e
7
- data.tar.gz: 357a8436751c0e47d29bd00cea9f9e380548f6a19ed541e6c0487d5da9afc7840aadae79911d17439571339cf1b8a6e8c414fb2653ac6a72f1c254c8903bcb3d
6
+ metadata.gz: ca532eca7480d11d6e754e13aa7c417fe7fd8da3e72e850a07408ac9f2ff6160dd9c243656b68923de1eca1c7d48a34b31415646176963e356102dca422d85a1
7
+ data.tar.gz: 75e33d5896da53c96aa2190da5920d733610084bd229525b5938c3ce32527ab65c44229bc5cd13b560a19def10f6e297eb7f258ae5d02496adedd5bbe7ec96b3
@@ -181,8 +181,7 @@ module Vmpooler
181
181
  /^\d{4}-\d{2}-\d{2}$/ === date_str
182
182
  end
183
183
 
184
- # NOTE: domain is not needed here, so we should update the callers of this method
185
- def hostname_shorten(hostname, domain=nil)
184
+ def hostname_shorten(hostname)
186
185
  hostname[/[^.]+/]
187
186
  end
188
187
 
@@ -540,17 +539,15 @@ module Vmpooler
540
539
  },
541
540
  kind: :client
542
541
  ) do
543
- Timeout.timeout(timeout) do
544
- target_host = host
545
- target_host = "#{host}.#{domain}" if domain
546
- span = OpenTelemetry::Trace.current_span
547
- span.set_attribute('net.peer.name', target_host)
548
- sock = TCPSocket.new target_host, port
549
- begin
550
- yield sock if block_given?
551
- ensure
552
- sock.close
553
- end
542
+ target_host = host
543
+ target_host = "#{host}.#{domain}" if domain
544
+ span = OpenTelemetry::Trace.current_span
545
+ span.set_attribute('net.peer.name', target_host)
546
+ sock = TCPSocket.new(target_host, port, connect_timeout: timeout)
547
+ begin
548
+ yield sock if block_given?
549
+ ensure
550
+ sock.close
554
551
  end
555
552
  end
556
553
  end