Logo
Explore Help
Sign In
bytemark/flexnbd-c
1
0
Fork 0
You've already forked flexnbd-c
Code Issues Pull Requests Releases Wiki Activity
Files
release-to-master
flexnbd-c/tests/acceptance/fakes/source/close_mid_read.rb

17 lines
348 B
Ruby
Raw Permalink Normal View History

Retry failed rebind attempts When we receive a migration, if rebinding to the new listen address and port fails for a reason which might be fixable, rather than killing the server we retry once a second. Also in this patch: non-overlapping log messages and a fix for the client going away halfway through a sendfile loop.
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
Rubocop
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)
Retry failed rebind attempts When we receive a migration, if rebinding to the new listen address and port fails for a reason which might be fixable, rather than killing the server we retry once a second. Also in this patch: non-overlapping log messages and a fix for the client going away halfway through a sendfile loop.
2012-07-12 14:14:46 +01:00
client.close
exit(0)
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.5 Page: 33ms Template: 2ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API