kristjanvalur / udptunnel

Automatically exported from code.google.com/p/udptunnel
GNU General Public License v3.0
0 stars 0 forks source link

bind: Address already in use #8

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
When I start udptunnel, and then close it, and run it again, I sometimes get 
this error.

$ udptunnel -vv -c 127.0.0.1 44444 192.168.1.1 44444 127.0.0.1 22
bind: Address already in use
Error: Error creating TCP socket.
Cleaning up...
Goodbye.

I have attached a patch that corrects this problem using setsockopt() and 
SO_REUSEADDR as referenced here 
http://beej.us/guide/bgnet/output/html/multipage/setsockoptman.html

Original issue reported on code.google.com by Mr.Micha...@gmail.com on 27 Oct 2011 at 2:27

Attachments: