File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,8 @@ type Conn struct {
45
45
capability uint32
46
46
// client-set capabilities only
47
47
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.
49
50
clientExplicitOffCaps uint32
50
51
51
52
attributes map [string ]string
@@ -236,13 +237,14 @@ func (c *Conn) Ping() error {
236
237
return nil
237
238
}
238
239
239
- // SetCapability enables the use of a specific capability
240
+ // SetCapability marks the specified flag as explicitly enabled by the client.
240
241
func (c * Conn ) SetCapability (cap uint32 ) {
241
242
c .ccaps |= cap
242
243
c .clientExplicitOffCaps &^= cap
243
244
}
244
245
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.
246
248
func (c * Conn ) UnsetCapability (cap uint32 ) {
247
249
c .ccaps &^= cap
248
250
c .clientExplicitOffCaps |= cap
You can’t perform that action at this time.
0 commit comments