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

Commit5798948

Browse files
committed
fixup! ws_js: Update to match new close code
1 parenta9e9d67 commit5798948

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

‎read.go‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,10 @@ func (c *Conn) Read(ctx context.Context) (MessageType, []byte, error) {
6464
// This function is idempotent.
6565
func (c*Conn)CloseRead(ctx context.Context) context.Context {
6666
c.closeReadMu.Lock()
67-
ifc.closeReadCtx!=nil {
67+
ctx2:=c.closeReadCtx
68+
ifctx2!=nil {
6869
c.closeReadMu.Unlock()
69-
returnc.closeReadCtx
70+
returnctx2
7071
}
7172
ctx,cancel:=context.WithCancel(ctx)
7273
c.closeReadCtx=ctx

‎ws_js.go‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -392,9 +392,10 @@ func (w *writer) Close() error {
392392
// CloseRead implements *Conn.CloseRead for wasm.
393393
func (c*Conn)CloseRead(ctx context.Context) context.Context {
394394
c.closeReadMu.Lock()
395-
ifc.closeReadCtx!=nil {
395+
ctx2:=c.closeReadCtx
396+
ifctx2!=nil {
396397
c.closeReadMu.Unlock()
397-
returnc.closeReadCtx
398+
returnctx2
398399
}
399400
ctx,cancel:=context.WithCancel(ctx)
400401
c.closeReadCtx=ctx

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp