good morning!!!!

Skip to content
Snippets Groups Projects
Unverified Commit 8d2374e0 authored by Anmol Sethi's avatar Anmol Sethi
Browse files

Merge pull request #438 from x0wllaar/fix-netconn-alignment

Fix unaligned load error on 32-bit architectures

Closes #432
parents 819f9d18 1cc90bb4
No related branches found
No related tags found
No related merge requests found
...@@ -94,18 +94,21 @@ func NetConn(ctx context.Context, c *Conn, msgType MessageType) net.Conn { ...@@ -94,18 +94,21 @@ func NetConn(ctx context.Context, c *Conn, msgType MessageType) net.Conn {
} }
type netConn struct { type netConn struct {
// These must be first to be aligned on 32 bit platforms.
// https://github.com/nhooyr/websocket/pull/438
readExpired int64
writeExpired int64
c *Conn c *Conn
msgType MessageType msgType MessageType
writeTimer *time.Timer writeTimer *time.Timer
writeMu *mu writeMu *mu
writeExpired int64
writeCtx context.Context writeCtx context.Context
writeCancel context.CancelFunc writeCancel context.CancelFunc
readTimer *time.Timer readTimer *time.Timer
readMu *mu readMu *mu
readExpired int64
readCtx context.Context readCtx context.Context
readCancel context.CancelFunc readCancel context.CancelFunc
readEOFed bool readEOFed bool
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment