File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,8 @@ const (
4242// This applies to context expirations as well unfortunately.
4343// See https://github.com/nhooyr/websocket/issues/242#issuecomment-633182220
4444type Conn struct {
45+ noCopy
46+
4547 subprotocol string
4648 rwc io.ReadWriteCloser
4749 client bool
@@ -288,3 +290,6 @@ func (m *mu) unlock() {
288290 default :
289291 }
290292}
293+
294+ type noCopy struct {}
295+ func (* noCopy ) Lock () {}
Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ const (
4040
4141// Conn provides a wrapper around the browser WebSocket API.
4242type Conn struct {
43+ noCopy
4344 ws wsjs.WebSocket
4445
4546 // read limit for a message in bytes.
@@ -563,3 +564,6 @@ func (m *mu) unlock() {
563564 default :
564565 }
565566}
567+
568+ type noCopy struct {}
569+ func (* noCopy ) Lock () {}
You can’t perform that action at this time.
0 commit comments