mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-12-22 10:08:15 -05:00
remove unnecessary flush
This commit is contained in:
parent
3925b62751
commit
cf6d36ecd5
@ -148,8 +148,6 @@ func (this *Connection) Write(b []byte) (int, error) {
|
|||||||
this.kcpAccess.Lock()
|
this.kcpAccess.Lock()
|
||||||
nBytes := this.kcp.Send(b[totalWritten:])
|
nBytes := this.kcp.Send(b[totalWritten:])
|
||||||
if nBytes > 0 {
|
if nBytes > 0 {
|
||||||
this.kcp.current = this.Elapsed()
|
|
||||||
this.kcp.flush()
|
|
||||||
totalWritten += nBytes
|
totalWritten += nBytes
|
||||||
if totalWritten == len(b) {
|
if totalWritten == len(b) {
|
||||||
this.kcpAccess.Unlock()
|
this.kcpAccess.Unlock()
|
||||||
|
Loading…
Reference in New Issue
Block a user