Skip to content

Commit

Permalink
rollback
Browse files Browse the repository at this point in the history
  • Loading branch information
wfurt committed Nov 22, 2022
1 parent a43aab4 commit 70a11fa
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -280,16 +280,13 @@ internal Socket CopyStateFromSource(Socket source)
_pendingConnectRightEndPoint = source._pendingConnectRightEndPoint;
_singleBufferReceiveEventArgs = source._singleBufferReceiveEventArgs;
#if DEBUG
/*
// Try to detect if a property gets added that we're not copying correctly.
foreach (PropertyInfo pi in typeof(Socket).GetProperties(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly))
{
object? origValue = pi.GetValue(source);
object? cloneValue = pi.GetValue(this);
//Debug.Assert(Equals(origValue, cloneValue), $"{pi.Name}. Expected: {origValue}, Actual: {cloneValue}");
Debug.Assert(Equals(origValue, cloneValue), $"{pi.Name}. Expected: {origValue}, Actual: {cloneValue}");
}
*/

#endif
return this;
}
Expand Down
5 changes: 0 additions & 5 deletions src/native/libs/System.Native/pal_networking.c
Original file line number Diff line number Diff line change
Expand Up @@ -1399,13 +1399,8 @@ int32_t SystemNative_ReceiveMessage(intptr_t socket, MessageHeader* messageHeade
ConvertMessageHeaderToMsghdr(&header, messageHeader, fd);

ssize_t res;
printf("%s:%d: recvmsg name %p %d socksize=%zd\n", __func__, __LINE__, header.msg_name, header.msg_namelen, sizeof(struct sockaddr_in6));
while ((res = recvmsg(fd, &header, socketFlags)) < 0 && errno == EINTR);

printf("%s:%d: recvmsg finished with %zd name %p %d\n", __func__, __LINE__, res, header.msg_name, header.msg_namelen);
printf("%s:%d: poer=%du addr (%s)\n", __func__, __LINE__, ((struct sockaddr_in*)header.msg_name)->sin_port, inet_ntoa(((struct sockaddr_in*)header.msg_name)->sin_addr));


assert(header.msg_name == messageHeader->SocketAddress); // should still be the same location as set in ConvertMessageHeaderToMsghdr
assert(header.msg_control == messageHeader->ControlBuffer);

Expand Down

0 comments on commit 70a11fa

Please sign in to comment.