Skip to content

Commit abad2bf

Browse files
committed
fix comment
1 parent 08ffcfe commit abad2bf

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

client/conn.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ type Conn struct {
4545
capability uint32
4646
// client-set capabilities only
4747
ccaps uint32
48-
// Flags explicitly disabled via SetCapability/UnsetCapability
48+
// Capability flags explicitly disabled by the client via UnsetCapability()
49+
// These flags are removed from the final advertised capability set during handshake.
4950
clientExplicitOffCaps uint32
5051

5152
attributes map[string]string
@@ -236,13 +237,14 @@ func (c *Conn) Ping() error {
236237
return nil
237238
}
238239

239-
// SetCapability enables the use of a specific capability
240+
// SetCapability marks the specified flag as explicitly enabled by the client.
240241
func (c *Conn) SetCapability(cap uint32) {
241242
c.ccaps |= cap
242243
c.clientExplicitOffCaps &^= cap
243244
}
244245

245-
// UnsetCapability disables the use of a specific capability
246+
// UnsetCapability marks the specified flag as explicitly disabled by the client.
247+
// This disables the flag even if the server supports it.
246248
func (c *Conn) UnsetCapability(cap uint32) {
247249
c.ccaps &^= cap
248250
c.clientExplicitOffCaps |= cap

0 commit comments

Comments
 (0)