Remove zero copy string conversion

This commit is contained in:
Lea Anthony
2020-10-28 20:38:33 +11:00
parent 4347d950d1
commit 3d4ea3918b

View File

@@ -2,7 +2,6 @@ package renderer
import (
"time"
"unsafe"
"github.com/gorilla/websocket"
"github.com/leaanthony/mewn"
@@ -50,7 +49,7 @@ func (s *session) Identifier() string {
func (s *session) sendMessage(msg string) error {
if !s.done {
s.writeChan <- *(*[]byte)(unsafe.Pointer(&msg))
s.writeChan <- []byte(msg)
}
return nil
}