summaryrefslogtreecommitdiff
path: root/src/lib/libssl/src/apps/s_server.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libssl/src/apps/s_server.c')
-rw-r--r--src/lib/libssl/src/apps/s_server.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/lib/libssl/src/apps/s_server.c b/src/lib/libssl/src/apps/s_server.c
index a36b1a3ad6..15070a44c1 100644
--- a/src/lib/libssl/src/apps/s_server.c
+++ b/src/lib/libssl/src/apps/s_server.c
@@ -2182,7 +2182,8 @@ static int sv_body(char *hostname, int s, unsigned char *context)
2182 if ((i <= 0) || (buf[0] == 'Q')) 2182 if ((i <= 0) || (buf[0] == 'Q'))
2183 { 2183 {
2184 BIO_printf(bio_s_out,"DONE\n"); 2184 BIO_printf(bio_s_out,"DONE\n");
2185 SHUTDOWN(s); 2185 shutdown(s, SHUT_RD);
2186 close(s);
2186 close_accept_socket(); 2187 close_accept_socket();
2187 ret= -11; 2188 ret= -11;
2188 goto err; 2189 goto err;
@@ -2190,8 +2191,10 @@ static int sv_body(char *hostname, int s, unsigned char *context)
2190 if ((i <= 0) || (buf[0] == 'q')) 2191 if ((i <= 0) || (buf[0] == 'q'))
2191 { 2192 {
2192 BIO_printf(bio_s_out,"DONE\n"); 2193 BIO_printf(bio_s_out,"DONE\n");
2193 if (SSL_version(con) != DTLS1_VERSION) 2194 if (SSL_version(con) != DTLS1_VERSION) {
2194 SHUTDOWN(s); 2195 shutdown(s, SHUT_RD);
2196 close(s);
2197 }
2195 /* close_accept_socket(); 2198 /* close_accept_socket();
2196 ret= -11;*/ 2199 ret= -11;*/
2197 goto err; 2200 goto err;
@@ -2376,7 +2379,8 @@ static void close_accept_socket(void)
2376 BIO_printf(bio_err,"shutdown accept socket\n"); 2379 BIO_printf(bio_err,"shutdown accept socket\n");
2377 if (accept_socket >= 0) 2380 if (accept_socket >= 0)
2378 { 2381 {
2379 SHUTDOWN2(accept_socket); 2382 shutdown(accept_socket, SHUT_RDWR);
2383 close(accept_socket);
2380 } 2384 }
2381 } 2385 }
2382 2386