File tree 2 files changed +9
-0
lines changed
2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,8 @@ const (
42
42
// This applies to context expirations as well unfortunately.
43
43
// See https://github.com/nhooyr/websocket/issues/242#issuecomment-633182220
44
44
type Conn struct {
45
+ noCopy
46
+
45
47
subprotocol string
46
48
rwc io.ReadWriteCloser
47
49
client bool
@@ -288,3 +290,6 @@ func (m *mu) unlock() {
288
290
default :
289
291
}
290
292
}
293
+
294
+ type noCopy struct {}
295
+ func (* noCopy ) Lock () {}
Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ const (
40
40
41
41
// Conn provides a wrapper around the browser WebSocket API.
42
42
type Conn struct {
43
+ noCopy
43
44
ws wsjs.WebSocket
44
45
45
46
// read limit for a message in bytes.
@@ -563,3 +564,6 @@ func (m *mu) unlock() {
563
564
default :
564
565
}
565
566
}
567
+
568
+ type noCopy struct {}
569
+ func (* noCopy ) Lock () {}
You can’t perform that action at this time.
0 commit comments