Skip to content

Commit

Permalink
Remove duplicate response callback in ws/stream.go
Browse files Browse the repository at this point in the history
I probably messed up a diff somewhere. The public repo
is now in sync with the private mirror.
  • Loading branch information
sergiu128 committed Nov 14, 2024
1 parent a57421c commit 0f1452e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
1 change: 0 additions & 1 deletion codec/websocket/definitions.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,4 +118,3 @@ func ExtraHeader(canonicalKey bool, key string, values ...string) Header {
CanonicalKey: canonicalKey,
}
}

10 changes: 0 additions & 10 deletions codec/websocket/stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,6 @@ type Stream struct {
// Optional callback invoked when an upgrade response is received.
upgradeResponseCallback UpgradeResponseCallback

// Optional callback invoked when an upgrade request is sent.
upReqCb UpgradeRequestCallback

// Optional callback invoked when an upgrade response is received.
upResCb UpgradeResponseCallback

// Used to establish a TCP connection to the peer with a timeout.
dialer *net.Dialer

Expand Down Expand Up @@ -961,10 +955,6 @@ func (s *Stream) upgrade(uri *url.URL, stream sonic.Stream, headers []Header) er
s.upgradeResponseCallback(res)
}

if s.upResCb != nil {
s.upResCb(res)
}

if !IsUpgradeRes(res) {
return ErrCannotUpgrade
}
Expand Down

0 comments on commit 0f1452e

Please sign in to comment.