mirror of
https://github.com/nadoo/glider.git
synced 2026-11-19 07:09:42 +08:00
1 parent
e7b12e36a9
commit
38b34030bc
11 files changed
+13
-36
No files matched your search
@@ -49,10 +49,7 @@ func (st *stream) Write(p []byte) (int, error) {
|
||||
}
|
||||
written := 0
|
||||
for len(p) > 0 {
|
||||
n := len(p)
|
||||
if n > maxFrameData {
|
||||
n = maxFrameData
|
||||
}
|
||||
n := min(len(p), maxFrameData)
|
||||
if err := st.s.writeFrame(frame{command: cmdPSH, streamID: st.id, data: p[:n]}); err != nil {
|
||||
return written, err
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user