Compare commits

...

2 Commits

2 changed files with 3 additions and 3 deletions

View File

@ -7,7 +7,7 @@ import "log"
import "net"
import "time"
import "errors"
import "context"
// import "context"
import "git.tebibyte.media/sashakoshka/hopp"
import "git.tebibyte.media/sashakoshka/hopp/examples/ping"
@ -59,7 +59,7 @@ func dial(address string) (hopp.Conn, error) {
// return conn, nil
underlying, err := net.Dial("tcp", address)
if err != nil { return nil, err }
conn := hopp.AdaptA(underlying, hopp.PartyClient)
conn := hopp.AdaptA(underlying, hopp.ServerSide)
return conn, nil
}

View File

@ -413,7 +413,7 @@ type writerA struct {
}
func (this *writerA) Write(data []byte) (n int, err error) {
if !this.open { return 0, io.EOF }
if !this.open || this.parent.closed.Load() { return 0, io.EOF }
toSend := data
for len(toSend) > 0 {
nn, err := this.writeOne(toSend)