mirror of
https://github.com/cbeuw/Cloak.git
synced 2024-11-17 15:25:30 +00:00
stream.Write now returns the correct amount of data written
This commit is contained in:
parent
d07312c6d1
commit
fc9f227ccf
@ -81,7 +81,6 @@ func (s *Stream) Read(buf []byte) (n int, err error) {
|
|||||||
//log.Tracef("%v read from stream %v with err %v",n, s.id,err)
|
//log.Tracef("%v read from stream %v with err %v",n, s.id,err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *Stream) Write(in []byte) (n int, err error) {
|
func (s *Stream) Write(in []byte) (n int, err error) {
|
||||||
@ -110,7 +109,10 @@ func (s *Stream) Write(in []byte) (n int, err error) {
|
|||||||
}
|
}
|
||||||
n, err = s.session.sb.send(s.obfsBuf[:i], &s.assignedConnId)
|
n, err = s.session.sb.send(s.obfsBuf[:i], &s.assignedConnId)
|
||||||
//log.Tracef("%v sent to remote through stream %v with err %v",n, s.id,err)
|
//log.Tracef("%v sent to remote through stream %v with err %v",n, s.id,err)
|
||||||
|
if err != nil {
|
||||||
return
|
return
|
||||||
|
}
|
||||||
|
return len(in), nil
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user