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:
Jan Vidar Krey
2012-10-16 20:15:38 +02:00
parent 50912bdf75
commit b1f2c93738
5 changed files with 130 additions and 95 deletions

View File

@@ -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);