GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

Check if channel is closed.

If our event channel is closed, our last read results in nil.  This
patch makes bridgestrap check for this condition before accessing the
result's struct members.
parent 410d69a5
......@@ -222,6 +222,11 @@ func (c *TorContext) TestBridgeLines(bridgeLines []string) *TestResult {
for {
select {
case ev := <-c.eventChan:
// Our channel is closed.
if ev == nil {
result.Error = "test aborted because bridgestrap is shutting down"
return result
}
for _, line := range ev.RawLines {
for bridgeLine, parser := range eventParsers {
// Skip bridges that are done testing.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment