websockets: handel SSL_AGAIN in non-connecting state
While it is harder to properly andle SSL_AGAIN in states other than WS_CONNECTING first ssl_read is the same, so at least handle it properly.
This commit is contained in:
parent
10073221cc
commit
2aec1fc456
|
@ -208,6 +208,8 @@ static gboolean discord_ws_in_cb(gpointer data, int source,
|
|||
gboolean disconnected;
|
||||
|
||||
if (ssl_read(dd->ssl, &buf, 1) < 1) {
|
||||
if (ssl_errno == SSL_AGAIN)
|
||||
return TRUE;
|
||||
imcb_error(ic, "Failed to read ws header.");
|
||||
discord_ws_reconnect(ic);
|
||||
return FALSE;
|
||||
|
|
Loading…
Reference in New Issue