Don't open the control socket until after the server socket is bound
This makes it easier for the tests (and supervisor) to guarantee to be able to connect to the server socket. Also this patch moves freeing the mirror supervisor into the server thread.
This commit is contained in:
@@ -97,7 +97,9 @@ class ValgrindKillingExecutor
|
||||
when "line"
|
||||
@error.add_line( @text ) if @found
|
||||
when "error", "stack"
|
||||
@killer.call( @error )
|
||||
if @found
|
||||
@killer.call( @error )
|
||||
end
|
||||
when "pid"
|
||||
@error.pid=@text
|
||||
end
|
||||
@@ -326,8 +328,10 @@ module FlexNBD
|
||||
def serve( file, *acl)
|
||||
cmd = serve_cmd( file, acl )
|
||||
run_serve_cmd( cmd )
|
||||
sleep( 0.2 ) until File.exists?( ctrl )
|
||||
end
|
||||
|
||||
|
||||
def listen(file, *acl)
|
||||
run_serve_cmd( listen_cmd( file, acl ) )
|
||||
end
|
||||
|
Reference in New Issue
Block a user