Closed MabezDev closed 9 months ago
Merging #841 (00cde4e) into main (28a5dd1) will increase coverage by
0.00%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## main #841 +/- ##
=======================================
Coverage 79.58% 79.58%
=======================================
Files 78 78
Lines 27809 27813 +4
=======================================
+ Hits 22131 22135 +4
Misses 5678 5678
Files Changed | Coverage Δ | |
---|---|---|
src/socket/tcp.rs | 96.62% <100.00%> (+<0.01%) |
:arrow_up: |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
Thank you!
Provided the local endpoint we are listening to is the same, it is safe to call
listen
multiple times. Fixes the doc comment for the function too.This isn't much use for this in smoltcp, in embassy-net it's crucial when writing an acceptor loop. Without this, if you try and accept on a socket that's already listening you'll immediately get an error. The only way around this is to first
abort
the socket, but this means that incoming connections can actually get aborted between theabort()
and the nextaccept()
, as I have sadly experienced myself today :smiling_face_with_tear:.