Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .github/workflows/build-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ jobs:
fetch-depth: 0
fetch-tags: true
- name: Setup Go
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
go-version: '1.21.x'
go-version-file: 'go.mod'

- name: Prepare environment
run: |
Expand Down Expand Up @@ -104,9 +104,9 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
go-version: '1.21.x'
go-version-file: 'go.mod'
- uses: actions/download-artifact@v4
with:
name: env.sh
Expand All @@ -130,9 +130,9 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
go-version: '1.21.x'
go-version-file: 'go.mod'
- uses: actions/download-artifact@v4
with:
name: env.sh
Expand Down Expand Up @@ -167,9 +167,9 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
go-version: '1.21.x'
go-version-file: 'go.mod'
- uses: actions/download-artifact@v4
with:
name: env.sh
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
go-version: '1.21.x'
go-version-file: 'go.mod'
- uses: actions/download-artifact@v4
with:
name: env.sh
Expand Down Expand Up @@ -57,9 +57,9 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
go-version: '1.21.x'
go-version-file: 'go.mod'
- uses: actions/download-artifact@v4
with:
name: env.sh
Expand Down Expand Up @@ -106,9 +106,9 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
go-version: '1.21.x'
go-version-file: 'go.mod'
- uses: actions/download-artifact@v4
with:
name: env.sh
Expand Down Expand Up @@ -142,9 +142,9 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
go-version: '1.21.x'
go-version-file: 'go.mod'
- uses: actions/download-artifact@v4
with:
name: env.sh
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/tests-and-linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
go-version: '1.21.x'
go-version-file: 'go.mod'

- name: Install protoc
run: |
Expand All @@ -39,9 +39,9 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
go-version: '1.21.x'
go-version-file: 'go.mod'

- name: Login to Docker Hub
uses: docker/login-action@v3
Expand All @@ -61,9 +61,9 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
uses: actions/setup-go@v6
with:
go-version: '1.21.x'
go-version-file: 'go.mod'

- name: Login to Docker Hub
uses: docker/login-action@v3
Expand Down
4 changes: 4 additions & 0 deletions ci/packages/package.go
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,10 @@ func packageDebian(binaryPath, arch string) error {
"BINARY": binaryPath,
}

if gopath, _ := sh.Output("go", "env", "GOPATH"); gopath != "" {
envs["PATH"] = fmt.Sprintf("%s:%s/bin", os.Getenv("PATH"), gopath)
}

if err := deb.TermsTemplateFile("bin/package/installation/templates"); err != nil {
return err
}
Expand Down
3 changes: 3 additions & 0 deletions ci/packages/raspberry.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ func configureRaspbianImage(raspbianImagePath string) error {
if err := shell.NewCmd("sudo apt-get install -y qemu-system qemu-user-static binfmt-support systemd-container").RunWith(envs); err != nil {
return err
}
if err := shell.NewCmd("sudo systemctl restart systemd-binfmt").Run(); err != nil {
return err
}
loopDevice, err := device.AttachLoop(raspbianImagePath)
if err != nil {
return err
Expand Down
26 changes: 25 additions & 1 deletion services/quic/connection/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,25 +159,49 @@ func (s *QuicServer) listenAndServeQUIC(ctx context.Context, tlsc *tls.Config) (
return fmt.Errorf("failed to listen for quic connection %w", err)
}

// Ensure listener is closed when context is cancelled
defer func() {
s.mu.Lock()
defer s.mu.Unlock()
if s.listener != nil {
s.listener.Close()
s.listener = nil
}
}()

for {
select {
case <-ctx.Done():
return ctx.Err()
default:
c, err := s.listener.Accept(ctx)
if err != nil {
s.mu.RLock()
listenerClosed := s.listener == nil
s.mu.RUnlock()
if listenerClosed {
log.Debug().Msg("QUIC listener closed, exiting accept loop")
return nil
}
log.Error().Err(err).Msg("failed to accept QUIC connection")

continue
}

s.mu.Lock()
switch c.ConnectionState().TLS.NegotiatedProtocol {
case "myst-communication":
log.Info().Msg("Setting communication connection")
if s.communicationConn != nil {
log.Warn().Msg("Closing old communication connection before replacing")
s.communicationConn.CloseWithError(0, "replaced by new connection")
}
s.communicationConn = c
case "myst-transport":
log.Info().Msg("Setting transport connection")
if s.transportConn != nil {
log.Warn().Msg("Closing old transport connection before replacing")
s.transportConn.CloseWithError(0, "replaced by new connection")
}
s.transportConn = c
}
s.mu.Unlock()
Expand Down