websocket: fix compilation after the more strict mutability check

pull/5965/head
Delyan Angelov 2020-07-24 08:41:14 +03:00
parent 346cc5ca2c
commit d83e2ee330
1 changed files with 4 additions and 4 deletions

View File

@ -1,21 +1,21 @@
module websocket
fn (ws &Client) send_message_event(msg &Message) {
fn (mut ws Client) send_message_event(msg &Message) {
ws.eb.publish('on_message', ws, msg)
ws.log.debug('sending on_message event')
}
fn (ws &Client) send_error_event(err string) {
fn (mut ws Client) send_error_event(err string) {
ws.eb.publish('on_error', ws, err)
ws.log.debug('sending on_error event')
}
fn (ws &Client) send_close_event() {
fn (mut ws Client) send_close_event() {
ws.eb.publish('on_close', ws, voidptr(0))
ws.log.debug('sending on_close event')
}
fn (ws &Client) send_open_event() {
fn (mut ws Client) send_open_event() {
ws.eb.publish('on_open', ws, voidptr(0))
ws.log.debug('sending on_open event')
}