net: connection: Log an error when running out of contexts
Running out of connection contexts is most likely due to app misconfiguration, therefore it's useful to get an explicit information that context allocation failed. Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
This commit is contained in:
parent
9f0cd47c78
commit
837d09ed9e
|
@ -352,6 +352,8 @@ int net_conn_register(uint16_t proto, uint8_t family,
|
||||||
|
|
||||||
conn = conn_get_unused();
|
conn = conn_get_unused();
|
||||||
if (!conn) {
|
if (!conn) {
|
||||||
|
NET_ERR("Not enough connection contexts. "
|
||||||
|
"Consider increasing CONFIG_NET_MAX_CONN.");
|
||||||
return -ENOENT;
|
return -ENOENT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue