websockets: continue logging in on SSL_AGAIN
It is possible for ssl_read to fail with SSL_AGAIN errno and in this case we should just continue logging in instead of failing right away.
This commit is contained in:
parent
8eee0b713f
commit
10073221cc
|
@ -182,7 +182,9 @@ static gboolean discord_ws_in_cb(gpointer data, int source,
|
|||
if (dd->state == WS_CONNECTING) {
|
||||
gchar buf[4096] = "";
|
||||
if (ssl_read(dd->ssl, buf, sizeof(buf)) < 1) {
|
||||
imcb_error(ic, "Failed to do ssl_read while switching to websocket mode");
|
||||
if (ssl_errno == SSL_AGAIN)
|
||||
return TRUE;
|
||||
imcb_error(ic, "Failed to do ssl_read while switching to websocket mode: %d", ssl_errno);
|
||||
imc_logout(ic, TRUE);
|
||||
return FALSE;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue