mirror of
https://github.com/vlang/v.git
synced 2025-09-18 20:07:02 -04:00
net.mbedtls: have shutdown close accepted connections too (#19164)
This commit is contained in:
parent
d503435dd4
commit
7927583de9
@ -180,7 +180,6 @@ pub fn (mut l SSLListener) accept() !&SSLConn {
|
|||||||
mut conn := &SSLConn{
|
mut conn := &SSLConn{
|
||||||
config: l.config
|
config: l.config
|
||||||
opened: true
|
opened: true
|
||||||
owns_socket: false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: save the client's IP address somewhere (maybe add a field to SSLConn ?)
|
// TODO: save the client's IP address somewhere (maybe add a field to SSLConn ?)
|
||||||
@ -189,6 +188,8 @@ pub fn (mut l SSLListener) accept() !&SSLConn {
|
|||||||
if ret != 0 {
|
if ret != 0 {
|
||||||
return error_with_code("can't accept connection", ret)
|
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_init(&conn.ssl)
|
||||||
C.mbedtls_ssl_config_init(&conn.conf)
|
C.mbedtls_ssl_config_init(&conn.conf)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user