Skip to content

Commit

Permalink
update websocket message from binary to text for easier integration (#12
Browse files Browse the repository at this point in the history
)
  • Loading branch information
tigerinus authored Nov 18, 2022
1 parent da18a8f commit 81c9cec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion route/api_route_event.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ func (r *APIRoute) SubscribeEvent(c echo.Context, sourceID codegen.SourceID, par

logger.Info("sending", zap.String("remote_addr", conn.RemoteAddr().String()), zap.String("message", string(message)))

if err := wsutil.WriteServerBinary(conn, message); err != nil {
if err := wsutil.WriteServerText(conn, message); err != nil {
if _, ok := err.(*net.OpError); ok {
logger.Info("ended", zap.String("error", err.Error()))
} else {
Expand Down

0 comments on commit 81c9cec

Please sign in to comment.