Skip to content

shynome/wazero-yamux-stdio-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Problem description

yamux is working on os/exec.Command.stdio, but not working in wazero wasi.

it seem goroutines is not running at yamux/session.go#L636, I don't know why, can you help me?

thanks for your seen

test

# you will see ping and pong output
go run . -sys
# you will only see ping, and the terminal is hang up
go run .
#  wasm call by wasmer also have the same problem, it seem golang wasm problem
go run . -wasmer
# gojs call is working
go run . -gojs

Debug

add log at yamux/session.go#L636, the log in goroutines is not running

	if flags&flagSYN == flagSYN {
		log.Println("handle ping")
		go func() {
			log.Println("handle ping and send")
			hdr := header(make([]byte, headerSize))
			hdr.encode(typePing, flagACK, 0, pingID)
			if err := s.sendNoWait(hdr); err != nil {
				s.logger.Printf("[WARN] yamux: failed to send ping reply: %v", err)
			}
		}()
		return nil
	}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages