Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8d2374e

Browse files
committed
Merge pull request#438 from x0wllaar/fix-netconn-alignment
Fix unaligned load error on 32-bit architecturesCloses#432
2 parents819f9d1 +1cc90bb commit8d2374e

File tree

1 file changed

+16
-13
lines changed

1 file changed

+16
-13
lines changed

‎netconn.go‎

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -94,22 +94,25 @@ func NetConn(ctx context.Context, c *Conn, msgType MessageType) net.Conn {
9494
}
9595

9696
typenetConnstruct {
97+
// These must be first to be aligned on 32 bit platforms.
98+
// https://github.com/nhooyr/websocket/pull/438
99+
readExpiredint64
100+
writeExpiredint64
101+
97102
c*Conn
98103
msgTypeMessageType
99104

100-
writeTimer*time.Timer
101-
writeMu*mu
102-
writeExpiredint64
103-
writeCtx context.Context
104-
writeCancel context.CancelFunc
105-
106-
readTimer*time.Timer
107-
readMu*mu
108-
readExpiredint64
109-
readCtx context.Context
110-
readCancel context.CancelFunc
111-
readEOFedbool
112-
reader io.Reader
105+
writeTimer*time.Timer
106+
writeMu*mu
107+
writeCtx context.Context
108+
writeCancel context.CancelFunc
109+
110+
readTimer*time.Timer
111+
readMu*mu
112+
readCtx context.Context
113+
readCancel context.CancelFunc
114+
readEOFedbool
115+
reader io.Reader
113116
}
114117

115118
var_ net.Conn=&netConn{}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp