Repository navigation
getty v1.6.0
First release since v1.5.2 (2025-09-19). This release contains breaking changes in the websocket write path — see below.
Breaking
- ws/wss writes keep message boundaries:
WriteBytesnow sends one whole payload as one websocket message instead of splitting it at 16 KiB, andWriteBytesArraysends one message per package instead of merging the batch into one. getty's websocket reader has no cross-message reassembly, so callers that relied on the old fragmenting behaviour must send a complete application-level package per write. - NewWSServer/NewWSSServer without WithWebsocketServerPath now panics during construction, naming the missing option, instead of crashing later inside the event-loop goroutine with an invalid ServeMux pattern.
- Session interface gains
SetMaxWriteMsgLen(int): callers of getty sessions are unaffected, but code implementing the Session interface itself must add the method. - The
godirective moves to 1.26.0 (required by x/net ≥ v0.60.0); CI installs the matching toolchain viago-version-file.
Improvements
- tcp client: a peer close (FIN) or reset now restores the connection. Reconnect attempts are paced against the last successful connect time (default 300 ms) instead of spinning on error; the wait is interrupted by client close so shutdown never triggers a reconnect storm; an EOF no longer permanently disables reconnection (#178, fixes #169).
- wss server: certificate-loading panics are recovered on the caller's goroutine and fail construction instead of crashing the process; certificates are no longer loaded after the server has been closed (#173).
- session: interrupted session initialization cleans the session up instead of leaving it registered; server close callbacks cannot run twice; TCP/UDP/WS linger rounds up so cleanup waits at least the configured linger (#175, fixes #170).
- session:
SetMaxWriteMsgLen(int)adds an explicit outbound limit for one websocket message (0 = unlimited), independent of the receive-sideSetMaxMsgLen. - deps:
golang.org/x/netbumped to v0.63.0, clearing reachable http2 advisories GO-2026-6617 / GO-2026-6612 / GO-2026-6611 / GO-2026-6603 plus html advisories GO-2026-6866 / GO-2026-6860;dubbogo/gostbumped to 1.15.1 (#181, #185, #186).
Bug Fixes
- websocket client: outbound mask randomness is restored by pinning gorilla/websocket to a revision containing the GO-2026-6278 fix (#179).
- wss server: the built TLS config no longer sets
InsecureSkipVerify. - udp server: a
NewSessionCallbackfailure now marks the server closed, soIsClosed()no longer reportsfalseon an endpoint whose only packet listener is already closed (#187). - session/transport: TCP incomplete-length limit, WS decompressed-size limit, WS write deadline, partial write-byte counts, random-port TLS and send/packet-lock race fixes (#141–#168 series).
CI
- setup-go 7.1.0, upload-artifact 7.0.2, codeql-action 4.39.x, skywalking-eyes header check bumps.
Full changelog: v1.5.2...v1.6.0