mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
net.websocket: fix a typo (allready -> already) (#17512)
This commit is contained in:
parent
7de3485bd2
commit
77b6bc1c1a
vlib/net/websocket
@ -40,7 +40,7 @@ fn (mut ws Client) socket_read_ptr(buf_ptr &u8, len int) !int {
|
||||
fn (mut ws Client) socket_write(bytes []u8) !int {
|
||||
lock {
|
||||
if ws.state == .closed || ws.conn.sock.handle <= 1 {
|
||||
ws.debug_log('socket_write: Socket allready closed')
|
||||
ws.debug_log('socket_write: Socket already closed')
|
||||
return error('socket_write: trying to write on a closed socket')
|
||||
}
|
||||
if ws.is_ssl {
|
||||
|
@ -330,8 +330,8 @@ pub fn (mut ws Client) write_string(str string) !int {
|
||||
pub fn (mut ws Client) close(code int, message string) ! {
|
||||
ws.debug_log('sending close, ${code}, ${message}')
|
||||
if ws.state in [.closed, .closing] || ws.conn.sock.handle <= 1 {
|
||||
ws.debug_log('close: Websocket allready closed (${ws.state}), ${message}, ${code} handle(${ws.conn.sock.handle})')
|
||||
err_msg := 'Socket allready closed: ${code}'
|
||||
ws.debug_log('close: Websocket already closed (${ws.state}), ${message}, ${code} handle(${ws.conn.sock.handle})')
|
||||
err_msg := 'Socket already closed: ${code}'
|
||||
return error(err_msg)
|
||||
}
|
||||
defer {
|
||||
|
Loading…
Reference in New Issue
Block a user