Reworked the error handling of non-blocking reads and writes.
This should prevent busy loops where the socket is makred readable but we are really only looking for it to become writable.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* uhub - A tiny ADC p2p connection hub
|
||||
* Copyright (C) 2007-2010, Jan Vidar Krey
|
||||
* Copyright (C) 2007-2012, Jan Vidar Krey
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -180,10 +180,8 @@ void net_con_close(struct net_connection* con)
|
||||
g_backend->handler.con_del(g_backend->data, con);
|
||||
|
||||
#ifdef SSL_SUPPORT
|
||||
#ifdef SSL_USE_OPENSSL
|
||||
if (con->ssl)
|
||||
net_ssl_shutdown(con);
|
||||
#endif /* SSL_USE_OPENSSL */
|
||||
#endif /* SSL_SUPPORT */
|
||||
|
||||
net_close(con->sd);
|
||||
|
||||
Reference in New Issue
Block a user