1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

fmt: remove space in front of ? and ! (#14366)

This commit is contained in:
Daniel Däschle
2022-05-13 05:56:21 +02:00
committed by GitHub
parent df029da942
commit d679146a80
324 changed files with 1865 additions and 1879 deletions

View File

@@ -55,7 +55,7 @@ pub fn (mut s Server) set_ping_interval(seconds int) {
// listen start listen and process to incoming connections from websocket clients
pub fn (mut s Server) listen() ? {
s.logger.info('websocket server: start listen on port $s.port')
s.ls = net.listen_tcp(s.family, ':$s.port') ?
s.ls = net.listen_tcp(s.family, ':$s.port')?
s.set_state(.open)
go s.handle_ping()
for {
@@ -108,15 +108,15 @@ fn (mut s Server) serve_client(mut c Client) ? {
defer {
c.logger.debug('server-> End serve client ($c.id)')
}
mut handshake_response, mut server_client := s.handle_server_handshake(mut c) ?
accept := s.send_connect_event(mut server_client) ?
mut handshake_response, mut server_client := s.handle_server_handshake(mut c)?
accept := s.send_connect_event(mut server_client)?
if !accept {
s.logger.debug('server-> client not accepted')
c.shutdown_socket() ?
c.shutdown_socket()?
return
}
// the client is accepted
c.socket_write(handshake_response.bytes()) ?
c.socket_write(handshake_response.bytes())?
lock {
s.clients[server_client.client.id] = server_client
}
@@ -158,7 +158,7 @@ fn (mut s Server) setup_callbacks(mut sc ServerClient) {
// accept_new_client creates a new client instance for client that connects to the socket
fn (mut s Server) accept_new_client() ?&Client {
mut new_conn := s.ls.accept() ?
mut new_conn := s.ls.accept()?
c := &Client{
is_server: true
conn: new_conn