ry / ebb fork watch download tarball
public this repo is viewable by everyone
Description: web server
Homepage: http://ebb.rubyforge.org
Clone URL: git://github.com/ry/ebb.git
error for accept() failure
Ryan Dahl (author)
about 1 month ago
commit  4c5b7621e02ee3c1a83db849ccf039d75b7da50e
tree    575f21479ed621cb75ddea08d088d86d7852716d
parent  213605bb5242a3474f7395d5d50fdbd69ec1a295
...
297
298
299
300
 
 
 
 
 
 
301
302
303
...
297
298
299
 
300
301
302
303
304
305
306
307
308
0
@@ -297,7 +297,12 @@ static client_init(ebb_server *server, ebb_client *client)
0
   /* DO SOCKET STUFF */
0
   socklen_t len;
0
   client->fd = accept(server->fd, (struct sockaddr*)&(server->sockaddr), &len);
0
- assert(client->fd >= 0);
0
+ if(client->fd < 0) {
0
+ perror("accept()");
0
+ client->open = FALSE;
0
+ return;
0
+ }
0
+
0
   int flags = fcntl(client->fd, F_GETFL, 0);
0
   assert(0 <= fcntl(client->fd, F_SETFL, flags | O_NONBLOCK));
0
   

Comments

    No one has commented yet.