2012-07-12 14:14:46 +01:00
|
|
|
#!/usr/bin/env ruby
|
|
|
|
|
|
|
|
# Connect, but get the protocol wrong: don't read the hello, so we
|
|
|
|
# close and break the sendfile.
|
|
|
|
|
|
|
|
require 'flexnbd/fake_source'
|
|
|
|
include FlexNBD
|
|
|
|
|
|
|
|
addr, port, srv_pid, newaddr, newport = *ARGV
|
|
|
|
|
2018-02-02 21:34:14 +00:00
|
|
|
client = FakeSource.new(addr, port, 'Timed out connecting')
|
|
|
|
client.write_read_request(0, 8)
|
|
|
|
client.read_raw(4)
|
2012-07-12 14:14:46 +01:00
|
|
|
client.close
|
|
|
|
|
|
|
|
exit(0)
|