Skip to content

Commit

Permalink
Bumped deprecated github actions uses + fixed client callback update
Browse files Browse the repository at this point in the history
  • Loading branch information
asticode committed Sep 20, 2024
1 parent c782b56 commit b24155e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- if: ${{ runner.os == 'Windows' }}
name: Set windows libsrt path
Expand All @@ -33,7 +33,7 @@ jobs:
- name: Cache libsrt
id: cache-libsrt
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ env.LIBSRT_PATH }}
key: libsrt-${{ env.LIBSRT_VERSION }}-${{ runner.os }}
Expand All @@ -56,7 +56,7 @@ jobs:
echo "DYLD_FALLBACK_LIBRARY_PATH=${{ env.LIBSRT_PATH }}/lib" >> $GITHUB_ENV
- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: '1.20'

Expand Down
12 changes: 6 additions & 6 deletions pkg/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,18 @@ func Dial(o DialOptions) (c *Connection, err error) {
return
}

// Connect
if c.addr, err = s.Connect(o.Host, o.Port); err != nil {
err = fmt.Errorf("astisrt: connecting failed: %w", err)
return
}

// Set callbacks
if o.OnDisconnect != nil {
if err = s.SetConnectCallback(o.OnDisconnect.connectCallback(c)); err != nil {
err = fmt.Errorf("astisrt: setting connect callback failed: %w", err)
return
}
}

// Connect
if c.addr, err = s.Connect(o.Host, o.Port); err != nil {
err = fmt.Errorf("astisrt: connecting failed: %w", err)
return
}
return
}

0 comments on commit b24155e

Please sign in to comment.