mirror of
https://github.com/v2fly/v2ray-core.git
synced 2026-02-07 00:35:22 -05:00
always allocate buffer in Write
This commit is contained in:
@@ -60,6 +60,10 @@ func (w *BufferedWriter) Write(b []byte) (int, error) {
|
||||
return w.legacyWriter.Write(b)
|
||||
}
|
||||
|
||||
if w.buffer == nil {
|
||||
w.buffer = New()
|
||||
}
|
||||
|
||||
totalBytes := 0
|
||||
for len(b) > 0 {
|
||||
nBytes, err := w.buffer.Write(b)
|
||||
|
||||
Reference in New Issue
Block a user