Skip to content

Commit

Permalink
conn: Ensure 64-bit alignment for atomics on 32-bit platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
Psychotropos authored and johnweldon committed Dec 1, 2018
1 parent 5c2c0f9 commit 412981c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ const (

// Conn represents an LDAP Connection
type Conn struct {
// requestTimeout is loaded atomically
// so we need to ensure 64-bit alignment on 32-bit platforms.
requestTimeout int64
conn net.Conn
isTLS bool
closing uint32
Expand All @@ -98,7 +101,6 @@ type Conn struct {
wgClose sync.WaitGroup
outstandingRequests uint
messageMutex sync.Mutex
requestTimeout int64
}

var _ Client = &Conn{}
Expand Down

0 comments on commit 412981c

Please sign in to comment.