Skip to content

Commit 80e5ed4

Browse files
fix a check that is not needed
1 parent 67bd015 commit 80e5ed4

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

src/net/tcp.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1392,10 +1392,6 @@ int send(int socket, const void* buffer, uint32_t length)
13921392
dprintf("send(): invalid socket %d\n", socket);
13931393
unlock_spinlock_irq(&lock, flags);
13941394
return TCP_ERROR_INVALID_SOCKET;
1395-
} else if (conn->state != TCP_ESTABLISHED) {
1396-
dprintf("send(): not connected %d\n", socket);
1397-
unlock_spinlock_irq(&lock, flags);
1398-
return TCP_ERROR_NOT_CONNECTED;
13991395
}
14001396
conn->send_buffer = krealloc(conn->send_buffer, length + conn->send_buffer_len);
14011397
memcpy(conn->send_buffer + conn->send_buffer_len, buffer, length);

0 commit comments

Comments
 (0)