|
@@ -253,17 +253,20 @@ void SocketsCon_Close(struct SocketCon *Con) {
|
253
|
253
|
}
|
254
|
254
|
|
255
|
255
|
static err_t tcp_server_accept(void *arg, struct tcp_pcb *newpcb, err_t err) {
|
256
|
|
- (void)err; // TODO?
|
|
256
|
+ if (err != ERR_OK) {
|
|
257
|
+ debug("ignoring failed accept");
|
|
258
|
+ return ERR_OK;
|
|
259
|
+ }
|
257
|
260
|
|
258
|
261
|
struct SocketCon *Con = arg;
|
259
|
262
|
size_t idx = Con->SocketFD;
|
260
|
263
|
if (rb_space(&sock[idx].child_rb) <= 0) {
|
261
|
264
|
debug("no space for new connection");
|
262
|
265
|
tcp_abort(newpcb);
|
263
|
|
- return ERR_ABRT;
|
|
266
|
+ return ERR_OK; // ERR_ABRT ?
|
264
|
267
|
}
|
265
|
268
|
|
266
|
|
- debug("new connection");
|
|
269
|
+ debug("new connection (%d)", err);
|
267
|
270
|
|
268
|
271
|
rb_push(&sock[idx].child_rb, &newpcb);
|
269
|
272
|
return ERR_OK;
|