Commit 67eaeba4c6c61be7208e672b1197fa4dda2fc4dd

Authored by Georg Hopp
1 parent b85024ba

set also the accepted sockets to nonblocking

@@ -64,7 +64,7 @@ connectionNextMessage(void * _this) @@ -64,7 +64,7 @@ connectionNextMessage(void * _this)
64 TR_RemoteData data = TR_queueGet(comm->read_buffer); 64 TR_RemoteData data = TR_queueGet(comm->read_buffer);
65 size_t end; 65 size_t end;
66 66
67 - if (NULL == this->current_message || this->current_message->ready) 67 + if (data && (! this->current_message || this->current_message->ready))
68 { 68 {
69 this->current_message = 69 this->current_message =
70 TR_protoCreateMessage(comm->protocol, data->remote); 70 TR_protoCreateMessage(comm->protocol, data->remote);
@@ -59,6 +59,7 @@ connectorAccept(void * _this, TR_Event event) @@ -59,6 +59,7 @@ connectorAccept(void * _this, TR_Event event)
59 (TR_TcpSocket)connection->transport); 59 (TR_TcpSocket)connection->transport);
60 60
61 while (socket) { 61 while (socket) {
  62 + TR_socketNonblock((TR_Socket)socket);
62 TR_Connection new_con = TR_new( 63 TR_Connection new_con = TR_new(
63 TR_Connection, 64 TR_Connection,
64 socket, 65 socket,
Please register or login to post a comment