Commit ee832003 authored by alexstocks's avatar alexstocks

fix websocket write error

parent 2a319e56
......@@ -180,7 +180,7 @@ func (this *gettyWSConn) read() ([]byte, error) {
func (this *gettyWSConn) write(p []byte) error {
// atomic.AddUint32(&this.writeCount, 1)
atomic.AddUint32(&this.writeCount, (uint32)(len(p)))
return this.conn.WriteMessage(len(p), p)
return this.conn.WriteMessage(websocket.BinaryMessage, p)
}
// close websocket connection
......
......@@ -11,6 +11,11 @@
## develop history ##
---
- 2016/10/11
> 1 fix bug: use websocket.BinaryMessage in conn.go:(gettyWSConn)write
>
> 2 version: 0.4.02
- 2016/10/10
> 1 delete session.go:Session{errFlag} to invoke codec.go:EventListener{OnClose&OnError} both when got a error
>
......
......@@ -10,9 +10,9 @@
package getty
const (
Version = "0.4.01"
DATE = "2016/10/10"
Version = "0.4.02"
DATE = "2016/10/12"
GETTY_MAJOR = 0
GETTY_MINOR = 4
GETTY_BUILD = 1
GETTY_BUILD = 2
)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment