From ff54b57870749f1eb9e29959521ff8ac5cdf7736 Mon Sep 17 00:00:00 2001 From: xtaci Date: Fri, 2 Sep 2016 10:45:28 +0800 Subject: [PATCH] renaming --- session.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/session.go b/session.go index 1cf7836..b3561e6 100644 --- a/session.go +++ b/session.go @@ -21,8 +21,8 @@ const ( // Session defines a multiplexed connection for streams type Session struct { - conn io.ReadWriteCloser - sendLock sync.Mutex + conn io.ReadWriteCloser + writeLock sync.Mutex config *Config nextStreamID uint32 // next stream identifier @@ -274,8 +274,8 @@ func (s *Session) keepalive() { // writeFrame writes the frame to the underlying connection, and returns len(f.data) if successful func (s *Session) writeFrame(f Frame) (n int, err error) { bts, _ := f.MarshalBinary() - s.sendLock.Lock() + s.writeLock.Lock() _, err = s.conn.Write(bts) - s.sendLock.Unlock() + s.writeLock.Unlock() return len(f.data), err }