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
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/pilot-protocol/handshake
go 1.25.12

require (
github.com/pilot-protocol/common v0.5.7
github.com/pilot-protocol/common v0.5.9
github.com/pilot-protocol/pilotprotocol v1.13.2
)

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
github.com/coder/websocket v1.8.15 h1:6B2JPeOGlpff2Uz6vOEH1Vzpi0iUz20A+lPVhPHtNUA=
github.com/coder/websocket v1.8.15/go.mod h1:NX3SzP+inril6yawo5CQXx8+fk145lPDC6pumgx0mVg=
github.com/pilot-protocol/common v0.5.7 h1:GY6KhB+PwV713HAAhVrVEZJN9e5DsnbfElPiOAEpzJE=
github.com/pilot-protocol/common v0.5.7/go.mod h1:Y6yaOsywr8J4aGvyoyuOtDpwZTheFM7GOjDt6Y/ZB9I=
github.com/pilot-protocol/common v0.5.9 h1:oCeIxMl8PtJowSU9UfSdzFXQ4s2pxxQBAitsg6P6pm8=
github.com/pilot-protocol/common v0.5.9/go.mod h1:Ybc6f1A37s3ShoEh1nBMVL9DPyYlxvkqPTvtbxaNWg4=
github.com/pilot-protocol/pilotprotocol v1.13.2 h1:ZZh+KQtAciX0hIxC111djs4fWCYwzbxIU0WnWoq2uKA=
github.com/pilot-protocol/pilotprotocol v1.13.2/go.mod h1:eMkx7zGmtktfF4tlksYmLtIbP4DMKNdJITG2SGvVdbQ=
github.com/pilot-protocol/rendezvous v0.2.5 h1:PvApwKHU2DnvK8pA6K9RAohUomZNu6vX6ccIEoTogvo=
Expand Down
5 changes: 5 additions & 0 deletions handshake.go
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,11 @@ func (hm *Manager) Start() error {
// single bounded Read rather than io.ReadAll so we return as soon as the
// message bytes land, without waiting for the sender to close the stream.
func (hm *Manager) handleConnection(stream coreapi.Stream) {
defer func() {
if r := recover(); r != nil {
slog.Error("handshake: recovered from panic in connection handler", "panic", r)
}
}()
const maxMsgSize = 64 * 1024

type readResult struct {
Expand Down
Loading