Skip to content

Commit

Permalink
temp logging
Browse files Browse the repository at this point in the history
  • Loading branch information
jellefoks committed Nov 19, 2024
1 parent ebbfb05 commit 070baa3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions net/socket/udp_socket_starboard.cc
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,16 @@ int UDPSocketStarboard::AdoptOpenedSocket(AddressFamily address_family,
}

void UDPSocketStarboard::Close() {
DLOG(INFO) << __FUNCTION__ << "Mark begin";
DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
DLOG(INFO) << __FUNCTION__ << "Mark 1";

owned_socket_count_.Reset();
DLOG(INFO) << __FUNCTION__ << "Mark 2";

if (socket_ == kSbSocketInvalid)
return;
DLOG(INFO) << __FUNCTION__ << "Mark 3";

// Zero out any pending read/write callback state.
read_buf_ = NULL;
Expand All @@ -132,16 +136,21 @@ void UDPSocketStarboard::Close() {
write_callback_.Reset();
send_to_address_.reset();

DLOG(INFO) << __FUNCTION__ << "Mark 4";
bool ok = socket_watcher_.UnregisterInterest(kSbSocketWaiterInterestRead |
kSbSocketWaiterInterestWrite);
DLOG(INFO) << __FUNCTION__ << "Mark 5";
DCHECK(ok);

DLOG(INFO) << __FUNCTION__ << "Mark 6";
is_connected_ = false;
if (!SbSocketDestroy(socket_)) {
DPLOG(ERROR) << "SbSocketDestroy";
}
DLOG(INFO) << __FUNCTION__ << "Mark 7";

socket_ = kSbSocketInvalid;
DLOG(INFO) << __FUNCTION__ << "Mark end";
}

int UDPSocketStarboard::GetPeerAddress(IPEndPoint* address) const {
Expand Down

0 comments on commit 070baa3

Please sign in to comment.