Skip to content

Commit

Permalink
Merge branch 'main' into event_timer_stop_panic
Browse files Browse the repository at this point in the history
  • Loading branch information
ackleymi authored Oct 25, 2023
2 parents 642bcfd + e4cffe0 commit 04812c8
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 10 deletions.
14 changes: 9 additions & 5 deletions _test/ReflectorClient.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,15 @@ def @reflector.waitConnectAction(cid)
end

def @reflector.waitDisconnectAction(cid)
socket = @sockets[cid]
if IO.select([socket], nil, nil, 10) == nil then
raise "Connection hangs after ten seconds."
elsif !socket.eof? then
raise "Expected disconnection, got data"
begin
socket = @sockets[cid]
if IO.select([socket], nil, nil, 10) == nil then
raise "Connection hangs after ten seconds."
elsif !socket.eof? then
raise "Expected disconnection, got data"
end
rescue Errno::ECONNRESET
# Ignore, server has already disconnected the socket
end
end

Expand Down
12 changes: 8 additions & 4 deletions _test/ReflectorServer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,14 @@ def @reflector.waitConnectAction(cid)
end

def @reflector.waitDisconnectAction(cid)
if IO.select([@socket], nil, nil, 10) == nil then
raise "Connection hangs after five seconds."
elsif !@socket.eof? then
raise "Expected disconnection, got data"
begin
if IO.select([@socket], nil, nil, 10) == nil then
raise "Connection hangs after five seconds."
elsif !@socket.eof? then
raise "Expected disconnection, got data"
end
rescue Errno::ECONNRESET
# Ignore, client has already disconnected the socket
end
end

Expand Down
2 changes: 1 addition & 1 deletion initiator.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func (i *Initiator) Start() (err error) {
i.wg.Done()
}(sessionID)
}

i.wg.Wait()
return
}

Expand Down

0 comments on commit 04812c8

Please sign in to comment.