Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

write to non-existent host does not cause an error #238

Open
tandem97 opened this issue Mar 22, 2023 · 0 comments
Open

write to non-existent host does not cause an error #238

tandem97 opened this issue Mar 22, 2023 · 0 comments

Comments

@tandem97
Copy link

tandem97 commented Mar 22, 2023

I do not get error on write when there is no server listening 127.0.0.1:55200. Why?

package main

import (
	"time"

	"github.com/xtaci/kcp-go/v5"
)

func main() {
	udpSession, _ := kcp.DialWithOptions("127.0.0.1:55200", nil, 10, 3)
	udpSession.SetWriteDeadline(time.Now().Add(5 * time.Second))
	if _, err := udpSession.Write([]byte{1}); err != nil {
		panic(err)
	}
}
@tandem97 tandem97 changed the title write to non-existent does not cause an error write to non-existent host does not cause an error Mar 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant