Skip to content

Commit

Permalink
fix: open socket before setting its options
Browse files Browse the repository at this point in the history
  • Loading branch information
mojomex committed Aug 27, 2024
1 parent 082a887 commit 3357ab0
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,10 @@ Status HesaiHwInterface::SensorInterfaceStart()
#ifdef WITH_DEBUG_STDOUT_HESAI_HW_INTERFACE
PrintError("init ok");
#endif
cloud_udp_driver_->receiver()->open();
#ifdef WITH_DEBUG_STDOUT_HESAI_HW_INTERFACE
PrintError("open ok");
#endif

bool success = cloud_udp_driver_->receiver()->setKernelBufferSize(UDP_SOCKET_BUFFER_SIZE);
if (!success) {
Expand All @@ -162,10 +166,6 @@ Status HesaiHwInterface::SensorInterfaceStart()
return Status::ERROR_1;
}

cloud_udp_driver_->receiver()->open();
#ifdef WITH_DEBUG_STDOUT_HESAI_HW_INTERFACE
PrintError("open ok");
#endif
cloud_udp_driver_->receiver()->bind();
#ifdef WITH_DEBUG_STDOUT_HESAI_HW_INTERFACE
PrintError("bind ok");
Expand Down

0 comments on commit 3357ab0

Please sign in to comment.