优化代码

This commit is contained in:
刘祥超
2023-01-12 19:02:38 +08:00
parent f233fbfb25
commit 1c34e49629

View File

@@ -145,6 +145,10 @@ func (this *ClientConn) Read(b []byte) (n int, err error) {
} }
func (this *ClientConn) Write(b []byte) (n int, err error) { func (this *ClientConn) Write(b []byte) (n int, err error) {
if len(b) == 0 {
return 0, nil
}
if this.isDebugging { if this.isDebugging {
this.lastWriteAt = time.Now().Unix() this.lastWriteAt = time.Now().Unix()