Skip to content

Instantly share code, notes, and snippets.

View dylanahsmith's full-sized avatar

Dylan Thacker-Smith dylanahsmith

  • Quebec
  • 07:44 (UTC -04:00)
View GitHub Profile
@dylanahsmith
dylanahsmith / test2.rb
Last active January 15, 2019 12:46
mysql2 EINTR on connect prolonged timeout reproduction
#!/usr/bin/env ruby
require 'mysql2'
require 'rbconfig'
CONNECT_TIMEOUT = ARGV.empty? ? nil : ARGV.shift.to_i
trap("USR2") {}
HOST = case RbConfig::CONFIG["host_os"]