Skip to content

Commit

Permalink
net.mbedtls: have shutdown close accepted connections too (#19164)
Browse files Browse the repository at this point in the history
  • Loading branch information
jameskirkwood committed Aug 30, 2023
1 parent d503435 commit 7927583
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion vlib/net/mbedtls/ssl_connection.v
Expand Up @@ -180,7 +180,6 @@ pub fn (mut l SSLListener) accept() !&SSLConn {
mut conn := &SSLConn{
config: l.config
opened: true
owns_socket: false
}

// TODO: save the client's IP address somewhere (maybe add a field to SSLConn ?)
Expand All @@ -189,6 +188,8 @@ pub fn (mut l SSLListener) accept() !&SSLConn {
if ret != 0 {
return error_with_code("can't accept connection", ret)
}
conn.handle = conn.server_fd.fd
conn.owns_socket = true

C.mbedtls_ssl_init(&conn.ssl)
C.mbedtls_ssl_config_init(&conn.conf)
Expand Down

0 comments on commit 7927583

Please sign in to comment.