close() call does not seem to send data before closing
See original GitHub issueHey,
I have the following code:
const graph =new StatsD({ host: 'example.com', port: 8125})
const responseTime = Date.now() - this.startTime
graph.timing('.response_time', responseTime)
graph.close(function(err) {
console.error('The close did not work quite right: ', err)
});
With the close
call there, no data is sent out at all. Am I using it correctly? The docs specify all data should be sent before the socket is closed.
Tested with tcpdump -n udp dst port 8125
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:11
Top Results From Across the Web
C TCP Server doesn't send data before closing - Stack Overflow
So I'm not able to receive the values on clientside while the server is still running.
Read more >Why Is It Important to Close Files in Python?
In this tutorial, you'll dive into that very question. First, you'll learn about how file handles are a limited resource. Then you'll experiment ......
Read more >WebSocket.close() - Web APIs - MDN Web Docs
close() method closes the WebSocket connection or connection attempt, if any. If the connection is already CLOSED , this method does nothing.
Read more >socket — Low-level networking interface — Python 3.11.1 ...
A subclass of OSError , this exception is raised when a timeout occurs on a socket which has had timeouts enabled via a...
Read more >If you don't use "with", when does Python close files? The ...
One of the first things that Python programmers learn is that you can easily read through the contents of an open file by...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Happy New Year- fixed this up in the PR above if folks want to review it or try it out.
@bdeitte Is this solved? I think it is still an issue