remove unnecessary flush

pull/215/head
v2ray 2016-06-27 00:04:28 +02:00
parent 3925b62751
commit cf6d36ecd5
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169
1 changed files with 0 additions and 2 deletions

View File

@ -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()