esp_http_server: fix default control port for HTTPS configuration

For simultaneous HTTP and HTTPS server use-case, default configurations
set same control socket port and hence one of the server initialization
fails with an error "error in creating control socket".

This commit modifies default initializers to use different control
socket port in HTTP vs HTTPS server case.

Closes https://github.com/espressif/esp-idf/issues/10160
Closes IDFGH-8719
This commit is contained in:
Mahavir Jain
2022-11-14 17:48:21 +05:30
parent 73724b0d41
commit 34f3287323
2 changed files with 4 additions and 2 deletions

View File

@@ -122,7 +122,7 @@ typedef struct httpd_ssl_config httpd_ssl_config_t;
.stack_size = 10240, \
.core_id = tskNO_AFFINITY, \
.server_port = 0, \
.ctrl_port = 32768, \
.ctrl_port = ESP_HTTPD_DEF_CTRL_PORT+1, \
.max_open_sockets = 4, \
.max_uri_handlers = 8, \
.max_resp_headers = 8, \