Close the mirror client socket on rejection

If the mirror attempt connects ok, but is rejected (say, for reporting
the wrong size), the client socket needs to be closed.  The destination
end can't close its socket and accept another connection attempt unless
it does.
This commit is contained in:
Alex Young
2012-07-15 18:30:20 +01:00
parent e0a61e91e6
commit e77234c6b1
3 changed files with 22 additions and 3 deletions

View File

@@ -21,4 +21,9 @@ client.write_hello( :size => :wrong )
t.join
# Now check that the source closed the first socket (yes, this was an
# actual bug)
fail "Didn't close socket" unless client.disconnected?
exit 0