serve: Make some error conditions non-fatal, test them.

We don't want flexnbd serve to fall over and die if the client sends an invalid request.
This commit is contained in:
nick
2013-02-15 16:51:28 +00:00
parent 63f7e3e8d4
commit 9b67d30608
7 changed files with 160 additions and 37 deletions

View File

@@ -13,10 +13,8 @@ addr, port = *ARGV
client = FakeSource.new( addr, port, "Timed out connecting", "127.0.0.6" )
sleep( 0.25 )
client.ensure_disconnected
rsp = client.disconnected? ? 0 : 1
client.close
exit(0)
exit(rsp)